-
Notifications
You must be signed in to change notification settings - Fork 316
/
pyproject.toml
107 lines (94 loc) · 2.41 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
[tool.coverage.run]
branch = true
source = ["care"]
parallel = true
concurrency = ["multiprocessing"]
relative_files = true
omit = [
"*/tests/*",
"*/migrations*/*",
"*/asgi.py",
"*/wsgi.py",
"docs/*",
"manage.py",
".venv/*",
]
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "raise NotImplementedError"]
ignore_errors = true
[tool.ruff]
target-version = "py312"
extend-exclude = ["*/migrations*/*", "care/abdm/*"]
include = ["*.py", "pyproject.toml"]
[tool.ruff.lint]
# https://docs.astral.sh/ruff/rules/
select = [
"F", # pyflakes
"E", # pycodestyle errors
"W", # pycodestyle warnings
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
# "ANN", # flake8-annotations
"S", # flake8-bandit
"FBT", # flake8-boolean-trap
"B", # flake8-bugbear
"A", # flake8-builtins
"COM", # flake8-commas
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"DJ", # flake8-django
"EM", # flake8-errmsg
"ISC", # flake8-import-conventions
"ICN", # flake8-import-order
"LOG", # flake8-logging
"G", # flake8-logging-format
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"T20", # flake8-print
"Q", # flake8-quotes
"RSE", # flake8-raise
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
"TCH", # flake8-todo
"INT", # flake8-gettext
# "ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
# "TD", # flake8-todo # disabling this for now
"ERA", # eradicate
"PL", # pylint
"FURB", # refurb
"RUF", # ruff
]
unfixable = [
"T20", # don't remove print statements
]
ignore = [
"E203", # whitespace-before-punctuation
"E501", # line-too-long
"FBT002", # boolean-default-value-positional-argument
"SIM105", # suppressible-exception
"PLR0913", # too-many-arguments
"DJ001", # django-nullable-model-string-field
"ISC001", # conflicts with format
"COM812", # conflicts with format
"RUF012", # Too hard
"FBT001", # why not!
"S106",
"S105",
"UP038" # this results in slower code
]
[tool.ruff.format]
line-ending = "lf"
[tool.ruff.lint.per-file-ignores]
"**/__init__.py" = ["E402", "F401"] # for imports
"**/tests/**" = ["DTZ001"]
[tool.ruff.lint.flake8-builtins]
builtins-ignorelist = ["id", "list", "filter"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.flake8-unused-arguments]
ignore-variadic-names = true