-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
87 lines (79 loc) · 2.17 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
[build-system]
build-backend = "setuptools.build_meta"
requires = [
"setuptools>=42",
"wheel",
]
[tool.black]
line-length = 79
target-version = ['py39']
[tool.coverage.run]
branch = false
omit = ["*tests*", "*examples*"]
[tool.coverage.html]
directory = "dist/coverage"
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [".git", "build", "dist"]
line-length = 79
# Assume Python 3.9
target-version = "py39"
# Enable
select = [
"E", # Pycodestyle Error
"F", # Pyflakes
"W", # Pycodestyle Warning
"C90", # mccabe
"I", # isort
"D", # Pydocstyle
"YTT", # flake8-2020
"ANN", # flake8-annotations
"S", # flake8-bandit
"BLE", # flake8-blind-except
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"EM", # flake8-errmsg
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PT", # flake8-pytest-style
"RET", # flake8-return
"SIM", # flake8-simplify
"PLC", # pylint
"PLE", # pylint
"PLR", # pylint
"PLW", # pylint
"PIE", # flake8-pie
"RUF", # ruff specific
]
# Always autofix, but never try to fix `F401` (unused imports).
fix = true
ignore = ["D203", "D212", "D107", "PLR0913"]
unfixable = ["F401"]
[tool.ruff.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.mccabe]
max-complexity = 12
[tool.ruff.per-file-ignores]
# Ignore `E402` (import violations) in all `__init__.py` files
"__init__.py" = ["E402"]
"examples/*.py" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"ANN101", # Missing type annotation for `self` in method
]
"tests/*.py" = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"S101", # Use of assert detected
"PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable
"PT011", # {exc} is to broad
]