-
-
Notifications
You must be signed in to change notification settings - Fork 479
/
ruff.toml
107 lines (102 loc) · 2.74 KB
/
ruff.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
# NOTE: You have to use single-quoted strings in TOML for regular expressions.
# It's the equivalent of r-strings in Python. Multiline strings are treated as
# verbose regular expressions by Black. Use [ ] to denote a significant space
# character.
# When switching from ruff.toml to pyproject.toml, use the section names that
# start with [tool.ruff
# [tool.ruff]
select = [
"A", # flake8-builtins
"AIR", # Airflow
"ASYNC", # flake8-async
"BLE", # flake8-blind-except
"C4", # flake8-comprehensions
"C90", # McCabe cyclomatic complexity
"CPY", # flake8-copyright
"DJ", # flake8-django
"E", # pycodestyle
"EXE", # flake8-executable
"F", # Pyflakes
"FA", # flake8-future-annotations
"FLY", # flynt
"ICN", # flake8-import-conventions
"INP", # flake8-no-pep420
"INT", # flake8-gettext
"ISC", # flake8-implicit-str-concat
"N", # pep8-naming
"NPY", # NumPy-specific rules
"PD", # pandas-vet
"PERF", # Perflint
"PGH", # pygrep-hooks
"PIE", # flake8-pie
"PL", # Pylint
"PT", # flake8-pytest-style
"PYI", # flake8-pyi
"RSE", # flake8-raise
"RUF", # Ruff-specific rules
"S", # flake8-bandit
"SIM", # flake8-simplify
"SLOT", # flake8-slots
"T10", # flake8-debugger
"T20", # flake8-print
"TCH", # flake8-type-checking
"W", # pycodestyle
"YTT", # flake8-2020
# "ANN", # flake8-annotations
# "ARG", # flake8-unused-arguments
# "B", # flake8-bugbear
# "COM", # flake8-commas
# "D", # pydocstyle
# "DTZ", # flake8-datetimez
# "EM", # flake8-errmsg
# "ERA", # eradicate
# "FBT", # flake8-boolean-trap
# "FIX", # flake8-fixme
# "G", # flake8-logging-format
# "I", # isort
# "PTH", # flake8-use-pathlib
# "Q", # flake8-quotes
# "RET", # flake8-return
# "SLF", # flake8-self
# "TD", # flake8-todos
# "TID", # flake8-tidy-imports
# "TRY", # tryceratops
# "UP", # pyupgrade
]
ignore = [
"F401",
"F403",
"F405",
"F841",
"FLY002",
"N806",
"N818",
"PERF401",
"PLW2901",
"PT008",
"RSE102",
"RUF005",
"RUF012",
"RUF013",
"S105",
"S106",
"S107",
]
line-length = 255
target-version = "py37"
# [tool.ruff.mccabe]
[mccabe]
max-complexity = 24 # default is 10
# [tool.ruff.per-file-ignores]
[per-file-ignores]
"docs/conf.py" = ["A001", "INP001"]
"oauthlib/oauth2/rfc6749/clients/base.py" = ["E722"]
"oauthlib/oauth2/rfc6749/endpoints/base.py" = ["BLE001"]
"oauthlib/openid/connect/core/grant_types/base.py" = ["BLE001"]
"tests/*" = ["PT009", "PT027", "S101"]
# [tool.ruff.pylint]
[pylint]
allow-magic-value-types = ["int", "str"]
max-args = 16 # default is 5
max-branches = 24 # default is 12
max-statements = 56 # default is 50