-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
124 lines (108 loc) · 3.04 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
[tool.ruff]
target-version = "py312"
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
# Exclude the `alembic` directory, which contains database migration scripts.
"migration/versions",
]
line-length = 100
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8 comprehensions
"B", # flake8 bugbear
"UP", # automatically upgrade syntax for newer versions of the language
"ASYNC", # flake8 async
"C4", # flake8 omprehensions
]
ignore = [
"B904", # raise exception from except block with no `from` keyword
"B024", # abstract class without abstract methods
"E501", # line too long (handled by ruff formatter)
"E711", # comparison to None shall be using `is` (sqlalchemy uses `==`)
"E712", # comparison to True should be `if cond is True:` or `if cond:` (sqlalchemy uses `==`)
]
fixable = ["ALL"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = 'double'
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.ruff.per-file-ignores]
"__init__.py" = ["F401", "E402"] # Ignore `E402` (import violations) in all `__init__.py` files
"locustfile.py" = ["B012"] # B012 `break` inside `finally` blocks cause exceptions to be silenced
[tool.coverage.run]
branch = true
parallel = true
[tool.coverage.report]
fail_under = 0
# Regexes for lines to exclude from consideration
exclude_also = [
# Don't complain about missing debug-only code:
"def __repr__",
"if self\\.debug",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run:
"if 0:",
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
"@(abc\\.)?abstractmethod",
]
[tool.interrogate]
ignore-init-method = true
ignore-init-module = true
ignore-magic = false
ignore-semiprivate = false
ignore-private = false
ignore-property-decorators = false
ignore-module = true
ignore-nested-functions = true
ignore-nested-classes = true
ignore-setters = false
fail-under = 20
exclude = [
"tests/*",
"migration/*",
"app/schemas/*"
]
ignore-regex = ["^get$", "^mock_.*", ".*BaseClass.*"]
# possible values: 0 (minimal output), 1 (-v), 2 (-vv)
verbose = 1
quiet = false
whitelist-regex = []
color = true
omit-covered-files = false
[tool.codespell]
skip = '.git,*.env'