-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
162 lines (145 loc) · 4.19 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#####################
# Python packaging: #
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "marshmallow-generic"
description = "Generic schema with full typing support and minimal boilerplate"
authors = [
{ name = "Daniil Fajnberg", email = "mail@daniil.fajnberg.de" },
]
maintainers = [
{ name = "Daniil Fajnberg", email = "mail@daniil.fajnberg.de" },
]
requires-python = ">=3.9, <4.0"
keywords = [
]
license = { text = "Apache Software License Version 2.0" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Typing :: Typed",
]
dynamic = [
"dependencies",
"readme",
"version",
]
[project.optional-dependencies]
dev = [
"black==23.9.1",
"build==1.0.3",
"coverage[toml]==7.3.2",
"isort==5.12.0",
"mkdocs-material==9.4.5",
"mkdocstrings[python]==0.23.0",
"mypy==1.5.0",
"ruff==0.0.292",
]
[project.urls]
"Repository" = "https://github.com/daniil-berg/marshmallow-generic"
"Issue Tracker" = "https://github.com/daniil-berg/marshmallow-generic/issues"
"Documentation" = "http://daniil-berg.github.io/marshmallow-generic"
[tool.setuptools.dynamic]
dependencies = { file = "requirements/common.txt" }
readme = { file = ["README.md"], content-type = "text/markdown" }
version = { attr = "marshmallow_generic.__version__" }
#########################
# Static type checking: #
[tool.mypy]
cache_dir = ".cache/mypy"
files = [
"src/",
"tests/",
]
warn_unused_configs = true
strict = true
show_error_codes = true
plugins = [
]
#######################
# Unit test coverage: #
[tool.coverage.run]
data_file = ".cache/coverage"
source = [
"src/",
]
branch = true
command_line = "-m tests"
omit = [
".venv*/*",
]
[tool.coverage.report]
show_missing = true
skip_covered = false
exclude_lines = [
"if TYPE_CHECKING:",
'''if __name__ == ['"]__main__['"]:''',
"@overload",
]
omit = [
"tests/*",
]
###############################
# Linting and style checking: #
[tool.ruff]
cache-dir = ".cache/ruff"
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"N", # pep8-naming
"D", # pydocstyle
"ANN", # flake8-annotations
"S", # flake8-bandit
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"C", # flake8-comprehensions
"PIE", # flake8-pie
"T20", # flake8-print
"RET", # flake8-return
"SIM", # flake8-simplify
"TD", # flake8-todos
"TCH", # flake8-type-checking
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"TRY", # tryceratops
"RUF", # ruff-specific
]
ignore = [
"E501", # Line too long -> handled by black
"D203", # 1 blank line required before class docstring -> D211 is better
"D212", # Multi-line docstring summary should start at the first line -> ugly, D213 is better
"D401", # First line of docstring should be in imperative mood -> no, it shouldn't
"D407", # Missing dashed underline after section -> different docstring style
"ANN101", # Missing type annotation for self in method -> unnecessary
"ANN102", # Missing type annotation for cls in classmethod -> unnecessary
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed -> we'll use it sparingly
]
[tool.ruff.per-file-ignores]
"src/**/__init__.py" = [
"A001", # Variable {name} is shadowing a Python builtin
"D104", # Missing docstring in public package
"F401", # {...} imported but unused
]
"tests/*.py" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D104", # Missing docstring in public package
]
###################
# Import sorting: #
[tool.isort]
profile = "black"
extra_standard_library = ["typing_extensions"]