forked from divad1196/pa-api-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ruff.toml
87 lines (78 loc) · 1.94 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
fix = true
# 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",
]
# Same as Black.
line-length = 88
indent-width = 4
[lint]
extend-select = [
"I", # isort
# "D", # pydocstyle
"S", # flake8-bandit (Security check), prefer to use bandit directly, it provides better feedback
"PERF", # Perflint
# "ERA", # Eradicate
"C90", # Complexity Check
# "FIX", # flake8-fixme
# "TD", # flake8-todos
"N", # pep8-naming
"COM", # flake8-commas
"C4", # flake8-comprehensions
"ISC", # flake8-implicit-str-concat
"INP", # flake8-no-pep420
"PIE", # flake8-pie
"Q", # flake8-quotes
"RET", # flake8-return
"SLF", # flake8-self
"SIM", # flake8-simplify
"TID", # flake8-tidy-imports
# "ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"FLY", # Flynt
# "FURB", # Refurb (requires preview mode)
"UP", # PyUpgrade
# "PL", # Pylint
# "TRY", # tryceratops
"RUF", # Ruff-specific rules
]
ignore = [
"PERF203", # try-except in loop
"SIM112", # Use capitalized environment variable
"ISC001", # Conflict with formatter
"COM812", # Conflict with formatter
"PTH123", # Do not force Path.open
]
[lint.extend-per-file-ignores]
"__init__.py" = ["F401"]
[lint.mccabe]
max-complexity = 20
[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"