-
Notifications
You must be signed in to change notification settings - Fork 4
/
pyproject.toml
115 lines (104 loc) · 2.81 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
[build-system]
requires = [
"setuptools",
"wheel",
]
[tool.black]
# https://github.com/psf/black
line-length = 120
exclude = "(.eggs|.git|.hg|.mypy_cache|.venv|_build|buck-out|build|dist)"
[tool.ruff]
target-version = "py38"
line-length = 120
# Exclude a variety of commonly ignored directories.
exclude = [
"docs"
]
[tool.ruff.lint]
select = [
"E", "W", # see: https://pypi.org/project/pycodestyle
"F", # see: https://pypi.org/project/pyflakes
"I", # isort
"D", # see: https://pypi.org/project/pydocstyle
"N", # see: https://pypi.org/project/pep8-naming
"S", # see: https://pypi.org/project/flake8-bandit
"RUF018", # see: https://docs.astral.sh/ruff/rules/assignment-in-assert
"UP", # see: https://docs.astral.sh/ruff/rules/#pyupgrade-up
]
extend-select = [
"C4", # see: https://pypi.org/project/flake8-comprehensions
"PT", # see: https://pypi.org/project/flake8-pytest-style
"RET", # see: https://pypi.org/project/flake8-return
"SIM", # see: https://pypi.org/project/flake8-simplify
"YTT", # see: https://pypi.org/project/flake8-2020
"ANN", # see: https://pypi.org/project/flake8-annotations
]
ignore-init-module-imports = true
unfixable = ["F401"]
[tool.ruff.lint.per-file-ignores]
"setup.py" = ["ANN202", "ANN401"]
"src/**" = ["ANN401"]
"tests/**" = [
"D100", "D101", "D103", "D107", "S101", "ANN101", "ANN401"
]
[tool.ruff.lint.pydocstyle]
# Use Google-style docstrings.
convention = "google"
[tool.ruff.lint.mccabe]
# Unlike Flake8, default to a complexity level of 10.
max-complexity = 10
[tool.codespell]
#skip = '*.py'
quiet-level = 3
# comma separated list of words; waiting for:
# https://github.com/codespell-project/codespell/issues/2839#issuecomment-1731601603
# also adding links until they ignored by its: nature
# https://github.com/codespell-project/codespell/issues/2243#issuecomment-1732019960
#ignore-words-list = ""
[tool.docformatter]
recursive = true
# this need to be shorter as some docstings are r"""...
wrap-summaries = 119
wrap-descriptions = 120
blank = true
[tool.check-manifest]
ignore = [
"*.yml",
".github",
".github/*"
]
[tool.pytest.ini_options]
norecursedirs = [
".git",
".github",
"dist",
"build",
"docs",
]
addopts = [
"--strict-markers",
"--doctest-modules",
"--color=yes",
"--disable-pytest-warnings",
]
#filterwarnings = ["error::FutureWarning"]
xfail_strict = true
junit_duration_report = "call"
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"pass",
]
[tool.coverage.run]
parallel = true
relative_files = true
[tool.mypy]
files = ["deprecate"]
disallow_untyped_defs = "True"
ignore_missing_imports = "True"
show_error_codes = "True"
warn_redundant_casts = "True"
warn_unused_configs = "True"
warn_unused_ignores = "True"
allow_redefinition = "True"
warn_no_return = "False"