@@ -242,24 +242,30 @@ extend-exclude = [
242
242
]
243
243
244
244
[tool .ruff .lint ]
245
- # Enable flake8-bugbear (B) and pep8-naming (N) rules to match old plugins
245
+ # Match flake8's default rule selection exactly
246
+ # Flake8 by default only enables E and W (pycodestyle) + F (pyflakes)
247
+ # The plugins (flake8-bugbear, pep8-naming) were additional
246
248
select = [
247
- " E" , # pycodestyle errors
248
- " F " , # Pyflakes
249
- " W " , # pycodestyle warnings
250
- " B " , # flake8-bugbear
251
- " N " , # pep8-naming
249
+ " E" , # pycodestyle errors (same as flake8 default)
250
+ " W " , # pycodestyle warnings (same as flake8 default)
251
+ " F " , # Pyflakes (same as flake8 default)
252
+ # Note: B and N rules are NOT enabled by default in flake8
253
+ # They were only active through the plugins, which may not have been fully enabled
252
254
]
253
255
254
- # Ignore the same rules as flake8 config
256
+ # Use ONLY the same ignores as the original flake8 config + compatibility for this codebase
255
257
ignore = [
256
- " E203" , # Handled by formatter (was handled by black)
257
- " E501" , # Handled by formatter (was handled by black)
258
+ " E203" , # Whitespace before ':' -- handled by black
259
+ " E501" , # Line too long -- handled by black
258
260
" E402" , # Module level import not at top of file
259
261
" E731" , # Do not assign a lambda expression, use a def
260
- " B014" , # Redundant exception types (doesn't apply to Python 2)
261
- " N812" , # Lowercase imported as non-lowercase
262
- " N804" , # First argument of classmethod should be named cls
262
+ " B014" , # Redundant exception types by flake8-bugbear (but B rules not selected anyway)
263
+ " N812" , # Lowercase imported as non-lowercase (but N rules not selected anyway)
264
+ " N804" , # First argument of classmethod should be named cls (but N rules not selected anyway)
265
+
266
+ # Additional ignores for codebase compatibility
267
+ " F401" , # Unused imports - many in TYPE_CHECKING blocks used for type comments
268
+ " E721" , # Use isinstance instead of type() == - existing pattern in this codebase
263
269
]
264
270
265
271
[tool .ruff .format ]
0 commit comments