forked from HXSecurity/DongTai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
62 lines (57 loc) · 1.76 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
[tool.mypy]
plugins = ["mypy_django_plugin.main"]
[tool.django-stubs]
django_settings_module = "dongtai_conf.settings"
[tool.black]
line-length = 120
target-version = ["py310"]
[tool.ruff]
line-length = 120
select = [
"F", # Pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"UP", # pyupgrade
"YTT", # flake8-2020
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLOT", # flake8-slots
"SIM", # flake8-simplify
"TCH", # flake8-type-checking
"INT", # flake8-gettext
"PGH", # pygrep-hooks
"PL", # Pylint
"TRY", # tryceratops
"FLY", # flynt
"PERF", # Perflint
"RUF", # Ruff-specific rules
]
ignore = [
"E501", # Line too long, handled by black
"SIM112", # Use capitalized environment variable
"PGH003", # Use specific rule codes when ignoring type issues
"PLR091", # Too many ...
"PLR2004", # Magic value used in comparison
"RUF012", # Mutable class attributes should be annotated with typing.ClassVar
"TRY003", # Avoid specifying long messages outside the exception class
"TRY301", # Abstract raise to an inner function
"PERF203", # try-except within a loop incurs performance overhead
"RUF001", # String contains ambiguous
]
# target version is python 3.9 because Cython not support some python 3.10 feature
target-version = "py39"
[tool.ruff.per-file-ignores]
"test/*.py" = ["T201"]
"**/tests.py" = ["T201"]
"deploy/*.py" = ["T201"]
"dongtai_conf/*.py" = ["T201"]
[tool.pyright]
ignore = [".venv", "**/urls.py"]