@@ -39,7 +39,7 @@ exclude = [
3939
4040[tool .ruff .lint ]
4141select = [
42- # "ANN", # flake8-annotationsq
42+ " ANN" , # flake8-annotationsq
4343 " F" , # Pyflakes
4444 " E" , # pycodestyle Error
4545 " W" , # pycodestyle Warning
@@ -93,37 +93,36 @@ select = [
9393 " RUF" , # Ruff-specific rules
9494]
9595ignore = [
96+ " ANN003" , # Missing type annotation for `**kwargs`, 15 remaining
97+ " PLR0917" , # Too many positional arguments (x/5)
98+ " PLR0914" , # Too many local variables (x/15)
9699 " ANN401" , # Dynamically typed expressions (typing.Any) are disallowed in ...
97- " ANN003" , # Missing type annotation for `**kwargs`, 22 remaining
98100
99101 " PYI042" , # Type alias `...` should be CamelCase FIXME
100102 " RUF039" , # First argument to `re.compile()` is not raw string
101103 " FURB189" ,
102104 # FURB189 Subclassing `dict` can be error prone, use `collections.UserDict` instead
103105 # FURB189 Subclassing `str` can be error prone, use `collections.UserStr` instead
104- " COM812" ,
105- " ISC001" ,
106+ " COM812" , # Trailing comma missing
106107 " SLF" , # Private member accessed
107108 " PYI034" , # py3.11: `__iadd__` methods in classes like `SqEntryList` usually return `self` at runtime
108109 " DTZ001" , # The use of `datetime.datetime()` without `tzinfo` argument is not allowed
109110 " DTZ005" , # The use of `datetime.datetime.now()` without `tz` argument is not allowed
110111 " PGH003" , # Use specific rule codes when ignoring type issues
111112
112- " PLR0914 " , # Too many local variables, 17 cases, --preview
113- " PLR0917 " , # Too many positional arguments, 23 cases, --preview
114- " PLR0915 " , # Too many statements, 28 cases
113+ " PLR0915 " , # Too many statements
114+ " PLR0911 " , # Too many return statements (x > 6)
115+ " PLR2004 " , # Magic value used in comparison, consider replacing `...` with a constant variable
115116
116117 " FURB166" , # Use of `int` with explicit `base=16` after removing prefix
117118 " FURB103" , # `open` and `write` should be replaced by `Path(...
118- " PLR2004" , # Magic value used in comparison, consider replacing `...` with a constant variable
119119 " PLC0415" , # `import` should be at the top-level of a file
120120 " PLW0603" , # Using the global statement to update `mockLog` is discouraged
121121 " PT027" , # Use `pytest.raises` instead of unittest-style `assertRaises`, why?
122122 " PD011" , # Use `.to_numpy()` instead of `.values`, WTF?
123123 " ICN001" , # `tkinter` should be imported as `tk`, WTF?
124124 " RUF005" , # Consider `[*_list, x]` instead of concatenation
125125 " PT009" , # Use a regular `assert` instead of unittest-style `assertEqual`, why?
126- " PLR0911" , # Too many return statements (x > 6)
127126 " RUF012" , # Mutable class attributes should be annotated with `typing.ClassVar`
128127 " BLE001" , # Do not catch blind exception: `Exception`
129128 " G004" , # Logging statement uses f-string, WTF?
@@ -151,8 +150,8 @@ ignore = [
151150 " SIM117" , # Use a single with statement with multiple contexts...
152151 " UP009" , # UTF-8 encoding declaration is unnecessary
153152 " UP037" , # Remove quotes from type annotation
154- " W191" , # Indentation contains tabs
155153 " SIM115" , # Use context handler for opening files
154+ " W191" , # Indentation contains tabs
156155]
157156
158157# Allow autofix for all enabled rules (when `--fix`) is provided.
@@ -203,19 +202,21 @@ mccabe.max-complexity = 13 # Unlike Flake8, default to a complexity level of 10.
203202]
204203"scripts/wiki-formats.py" = [" E501" ]
205204"pyglossary/io_utils.py" = [" ANN" ]
206- "pyglossary/plugins/babylon_bgl/bgl_reader_debug .py" = [" ANN" , " FURB" ]
205+ "pyglossary/plugins/babylon_bgl/reader_debug .py" = [" ANN" , " FURB" ]
207206"pyglossary/ui/**/*.py" = [
208207 " ANN" ,
209208 " T201" ,
210209 " PERF203" ,
211210 " PLR0904" , # Too many public methods
212211 " PLR0912" , # Too many branches
212+ " PLR0915" , # Too many statements
213213 " PLR6301" , # Method `...` could be a function, class method, or static method
214214 " C90" , # mccabe: C901: {name} is too complex ({complexity})
215215]
216216"tests/*.py" = [
217217 " ANN" ,
218218 " T201" ,
219+ " PLR0915" , # Too many statements
219220 " PLR6301" , # Method `...` could be a function, class method, or static method
220221 " E501" , # Line too long
221222]
0 commit comments