@@ -60,4 +60,97 @@ show_missing = true
60
60
skip_covered = true
61
61
62
62
[tool .ruff ]
63
+ target-version = " py310"
63
64
line-length =120
65
+ show-fixes = true
66
+
67
+ [tool .ruff .lint ]
68
+ ignore = [
69
+ " ANN101" ,
70
+ " ANN102" ,
71
+ " EM101" ,
72
+ " TRY003" , # Disable until we start creating proper exception classes
73
+ " PT011" , # Disable until we start creating proper exception classes
74
+ " PTH123" , # Not using open() to open files
75
+ ]
76
+ select = [
77
+ " A" , # Builtins
78
+ " ANN" , # Annotations
79
+ " ARG" , # Unused arguments
80
+ " B" , # Bugbear
81
+ " BLE" , # Blind except
82
+ " C4" , # Comprehensions
83
+ " C90" , # mccabe
84
+ " COM" , # Commas
85
+ " D" ,
86
+ " D1" , # Undocumented public elements
87
+ " D2" , # Docstring conventions
88
+ " D3" , # Triple double quotes
89
+ " D4" , # Docstring text format
90
+ " DTZ" , # Datetimes
91
+ " EM" , # Error messages
92
+ " ERA" , # Commented-out code
93
+ " EXE" , # Executable
94
+ " F" , # Pyflakes
95
+ " FA" , # __future__ annotations
96
+ " FLY" , # F-strings
97
+ # "FURB", # Refurb
98
+ " G" , # Logging format
99
+ " I" , # Isort
100
+ " ICN" , # Import conventions
101
+ " INP" , # Disallow PEP-420 (Implicit namespace packages)
102
+ " INT" , # gettext
103
+ " ISC" , # Implicit str concat
104
+ # "LOG", # Logging
105
+ " N" , # PEP-8 Naming
106
+ " NPY" , # Numpy
107
+ " PERF" , # Unnecessary performance costs
108
+ " PGH" , # Pygrep hooks
109
+ " PIE" , # Unnecessary code
110
+ " PL" , # Pylint
111
+ " PT" , # Pytest
112
+ " PTH" , # Use Pathlib
113
+ " PYI" , # Stub files
114
+ " Q" , # Quotes
115
+ " RET" , # Return
116
+ " RUF" , # Ruff
117
+ " RSE" , # Raise
118
+ " S" , # Bandit
119
+ " SIM" , # Code simplification
120
+ " SLF" , # Private member access
121
+ " SLOT" , # __slots__
122
+ " T10" , # Debugger
123
+ " T20" , # Print
124
+ " TCH" , # Type checking
125
+ " TID" , # Tidy imports
126
+ " TRY" , # Exception handling
127
+ " UP" , # Pyupgrade
128
+ " W" , # Warnings
129
+ " YTT" , # sys.version
130
+ ]
131
+
132
+
133
+ [tool .ruff .lint .per-file-ignores ]
134
+ # https://beta.ruff.rs/docs/rules/
135
+ "__init__.py" = [" F401" ," F403" ," F405" ,]
136
+ "tests/*" = [" ANN" , " ARG" , " INP001" , " S101" , " SLF001" ]
137
+
138
+ [tool .ruff .lint .pylint ]
139
+ max-args = 15
140
+ max-branches = 20
141
+ max-returns = 10
142
+ max-statements = 80
143
+
144
+ [tool .ruff .lint .flake8-tidy-imports ]
145
+ ban-relative-imports = " all"
146
+
147
+ [tool .ruff .lint .flake8-quotes ]
148
+ docstring-quotes = " double"
149
+ multiline-quotes = " double"
150
+
151
+ [tool .ruff .lint .mccabe ]
152
+ # Unlike Flake8, default to a complexity level of 10.
153
+ max-complexity = 10
154
+
155
+ [tool .ruff .lint .pydocstyle ]
156
+ convention = " google"
0 commit comments