-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
102 lines (88 loc) · 3.02 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
[tool.ruff]
line-length = 100
target-version = "py312"
extend-exclude = ["typings"]
[tool.ruff.lint]
select = ["ALL"]
ignore = [
# Incompatible with formatter
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"COM812", # missing-trailing-comma
"COM819", # prohibited-trailing-comma
"D206", # indent-with-spaces
"D300", # triple-single-quotes
"E111", # indentation-with-invalid-multiple
"E114", # indentation-with-invalid-multiple-comment
"E117", # over-indented
"ISC001", # single-line-implicit-string-concatenation
"ISC002", # multi-line-implicit-string-concatenation
"Q", # flake8-quotes
"W191", # tab-indentation
"A003", # Class attribute is shadowing a Python builtin
"ANN", # flake8-annotations
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"D1", # Missing docstring
"EM101", # Exception must not use a string literal, assign to variable first
"EM102", # Exception must not use an f-string literal, assign to variable first
"ERA001", # Found commented-out code
"FIX", # flake8-fixme
"TD002", # Missing author in TODO
"TD003", # Missing issue link on the line following this TODO
"TRY003", # Avoid specifying long messages outside the exception class
# Excessive
"RET503", # implict return
"PLR2004", # magic value used in comparison
# Try to fix upstream
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
# Try to fix in the future
"DJ001", # null=True on char fields
"TCH002", # use type-checking blocks
"TRY002", # create custom exceptions
"A002", # shadowing builtins, we do this a lot with id for endpoints
]
[tool.ruff.lint.per-file-ignores]
"isic/settings.py" = [
"FBT003", # boolean positional value
]
"scripts/**" = [
"INP001", # File is part of an implicit namespace package
]
"**/migrations/**" = [
"N806", # Variable in function should be lowercase
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
]
"**/management/commands/**" = [
"INP001", # File is part of an implicit namespace package
]
"**/tests/**" = [
"DJ007", # Do not use `__all__`
"DJ008", # Model does not define `__str__` method
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
"S", # flake8-bandit
"SLF001", # Private member accessed
]
[tool.ruff.format]
quote-style = "double"
[tool.ruff.lint.flake8-self]
extend-ignore-names = ["_base_manager", "_default_manager", "_meta"]
[tool.ruff.lint.flake8-bugbear]
extend-immutable-calls = ["ninja.Query"]
[tool.ruff.lint.isort]
# Sort by name, don't cluster "from" vs "import"
force-sort-within-sections = true
[tool.ruff.lint.pydocstyle]
convention = "pep257"
[tool.mypy]
disable_error_code = "var-annotated,return"
ignore_missing_imports = true
warn_unused_configs = true
check_untyped_defs = true
plugins = ["mypy_django_plugin.main"]
[[tool.mypy.overrides]]
module = ["isic.core.pagination"]
ignore_errors = true
[tool.django-stubs]
django_settings_module = "isic.settings.testing"
strict_settings = false