-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.ruff.toml
More file actions
128 lines (116 loc) · 3.78 KB
/
Copy path.ruff.toml
File metadata and controls
128 lines (116 loc) · 3.78 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# source dirs
src = ["aas_standard_parser"]
# set cache dir to our project's cache dir
cache-dir = "~/.cache/ruff"
# custom excludes
extend-exclude = [
".build",
".github",
".idea",
".package",
"pytest_cache",
".vscode",
"dist",
"docs",
"tests",
]
line-length = 150
[lint]
# Note on these rules:
# We created a set which we consider a good default for our projects. Some of these rules aren't valid in all cases.
# If you encounter such a false positive please try to suppress the rule by using a `# noqa: <rule>` comment.
# The next best thing you can do is add the rules you don't like to the the `ignore` list.
# And last but not least you can remove complete rulesets by removing them from the `select` list.
# You can see all rules at https://docs.astral.sh/ruff/rules (we also added not active rules here in comments
# which makes it easier to update the list for new versions of ruff).
select = [
"F", # PyFlakes (F)
"E", # pycodestyle (E,W)
"W",
"C90", # mccabe (C90)
"I", # isort (I)
"N", # pep8-naming (N)
"D", # pydocstyle (D)
"UP", # pyupgrade (UP)
# flake8-2020 (YTT)
# flake8-annotations (ANN)
"ASYNC", # flake8-async (ASYNC)
"S", # flake8-bandit (S)
"BLE", # flake8-blind-except (BLE)
"FBT", # flake8-boolean-trap (FBT)
"B", # flake8-bugbear (B)
"A", # flake8-builtins (A)
# flake8-commas (COM)
# flake8-copyright (CPY)
"C4", # flake8-comprehensions (C4)
"DTZ", # flake8-datetimez (DTZ)
# flake8-debugger (T10)
# flake8-django (DJ)
# flake8-errmsg (EM)
# flake8-executable (EXE)
# flake8-future-annotations (FA)
# flake8-implicit-str-concat (ISC)
"ICN", # flake8-import-conventions (ICN)
"LOG", # flake8-logging (LOG)
"G", # flake8-logging-format (G)
# flake8-no-pep420 (INP)
"PIE", # flake8-pie (PIE)
# flake8-print (T20)
"PYI", # flake8-pyi (PYI)
"PT", # flake8-pytest-style (PT)
"Q", # flake8-quotes (Q)
"RSE", # flake8-raise (RSE)
"RET", # flake8-return (RET)
"SLF", # flake8-self (SLF)
# flake8-slots (SLOT)
"SIM", # flake8-simplify (SIM)
# flake8-tidy-imports (TID)
"TC", # flake8-type-checking (TC)
# flake8-gettext (INT)
"ARG", # flake8-unused-arguments (ARG)
"PTH", # flake8-use-pathlib (PTH)
# flake8-todos (TD)
# flake8-fixme (FIX)
# eradicate (ERA)
# pandas-vet (PD)
"PL", # Pylint (PL)
# tryceratops (TRY)
"FLY", # flynt (FLY)
# NumPy-specific rules (NPY)
# FastAPI (FAST)
# Airflow (AIR)
"PERF", # Perflint (PERF)
# refurb (FURB)
# pydoclint (DOC)
"RUF", # Ruff-specific rules (RUF)
]
# ignore some rules
ignore = [
"A002", # Function argument is shadowing a Python builtin
"D301", # Use r""" if any backslashes in a docstring
"D213", # Multi-line docstring summary should start at the second line
"D212", # Multi-line docstring summary should start at the first line
"D203", # 1 blank line required before class docstring
"E203", # Whitespace before '{symbol}'
"E501", # Line too long ({width} > {limit})
"G004", # Logging statement uses f-string
"PLC1901", # {existing} can be simplified to {replacement} as an empty string is falsey
"PLR2004", # Checks for the use of unnamed numerical constants ("magic") values in comparisons
"BLE001", # Check for generic exceptions
"D401", # Imperative docstring
]
# allow autofix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[lint.extend-per-file-ignores]
"tests/**" = ["D"]
[lint.mccabe]
max-complexity = 10
[lint.pycodestyle]
max-doc-length = 150
[lint.pydocstyle]
convention = "pep257"
[lint.pylint]
max-args = 9
[lint.isort]
known-first-party = ["aas_standard_parser"]