You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"SIM102", # Use a single `if` statement instead of nested `if` statements
27
+
"SIM108", # Use ternary operator `{contents}` instead of `if`-`else`-block
28
+
"UP031", # Use format specifiers instead of percent format
29
+
"UP032", # Use f-string instead of `format` call
30
+
26
31
]
27
32
external = [ # Whitelist for RUF100 unknown code warnings
28
33
"E704",
@@ -152,10 +157,7 @@ select = [
152
157
"G202", # Logging statement has redundant `exc_info`
153
158
# isort ('I')
154
159
"I",
155
-
# flake8-import-conventions ('ICN')
156
-
"ICN001", # `{name}` should be imported as `{asname}`
157
-
"ICN002", # `{name}` should not be imported as `{asname}`
158
-
"ICN003", # Members of `{name}` should not be imported explicitly
160
+
"ICN", # flake8-import-conventions
159
161
# flake8-no-pep420 ('INP')
160
162
"INP",
161
163
# flake8-gettext ('INT')
@@ -346,52 +348,16 @@ select = [
346
348
"S612", # Use of insecure `logging.config.listen` detected
347
349
# "S701", # Using jinja2 templates with `autoescape=False` is dangerous and can lead to XSS. Ensure `autoescape=True` or use the `select_autoescape` function.
348
350
# "S702", # Mako templates allow HTML and JavaScript rendering by default and are inherently open to XSS attacks
349
-
# flake8-simplify ('SIM')
350
-
"SIM101", # Multiple `isinstance` calls for `{name}`, merge into a single call
351
-
# "SIM102", # Use a single `if` statement instead of nested `if` statements
352
-
# "SIM103", # Return the condition `{condition}` directly
353
-
"SIM105", # Use `contextlib.suppress({exception})` instead of `try`-`except`-`pass`
354
-
"SIM107", # Don't use `return` in `try`-`except` and `finally`
355
-
# "SIM108", # Use ternary operator `{contents}` instead of `if`-`else`-block
356
-
"SIM109", # Use `{replacement}` instead of multiple equality comparisons
357
-
"SIM110", # Use `{replacement}` instead of `for` loop
358
-
"SIM112", # Use capitalized environment variable `{expected}` instead of `{original}`
359
-
"SIM114", # Combine `if` branches using logical `or` operator
360
-
"SIM115", # Use context handler for opening files
361
-
"SIM116", # Use a dictionary instead of consecutive `if` statements
362
-
"SIM117", # Use a single `with` statement with multiple contexts instead of nested `with` statements
363
-
"SIM118", # Use `{key} {operator} {dict}` instead of `{key} {operator} {dict}.keys()`
364
-
"SIM201", # Use `{left} != {right}` instead of `not {left} == {right}`
365
-
"SIM202", # Use `{left} == {right}` instead of `not {left} != {right}`
366
-
"SIM208", # Use `{expr}` instead of `not (not {expr})`
367
-
"SIM210", # Use `bool({expr})` instead of `True if {expr} else False`
368
-
"SIM211", # Use `not {expr}` instead of `False if {expr} else True`
369
-
"SIM212", # Use `{expr_else} if {expr_else} else {expr_body}` instead of `{expr_body} if not {expr_else} else {expr_else}`
370
-
"SIM220", # Use `False` instead of `{name} and not {name}`
371
-
"SIM221", # Use `True` instead of `{name} or not {name}`
372
-
"SIM222", # Use `{expr}` instead of `{replaced}`
373
-
"SIM223", # Use `{expr}` instead of `{replaced}`
374
-
"SIM300", # Yoda conditions are discouraged, use `{suggestion}` instead
375
-
"SIM401", # Use `{contents}` instead of an `if` block
376
-
"SIM910", # Use `{expected}` instead of `{original}`
351
+
"SIM", # flake8-simplify
377
352
# flake8-self ('SLF')
378
353
# NOT YET USED
379
-
# flake8-slots ('SLOT')
380
-
"SLOT000", # Subclasses of `str` should define `__slots__`
381
-
"SLOT001", # Subclasses of `tuple` should define `__slots__`
382
-
"SLOT002", # Subclasses of `collections.namedtuple()` should define `__slots__`
354
+
"SLOT", # flake8-slots
383
355
# flake8-debugger ('T10')
384
356
"T100", # Trace found: `{name}` used
385
357
# flake8-print ('T20')
386
358
"T201", # `print` found
387
359
"T203", # `pprint` found
388
-
# flake8-type-checking ('TCH')
389
-
"TCH001", # Move application import `{}` into a type-checking block
390
-
"TCH002", # Move third-party import `{}` into a type-checking block
391
-
"TCH003", # Move standard library import `{}` into a type-checking block
392
-
"TCH004", # Move import `{qualified_name}` out of type-checking block. Import is used for more than type hinting.
393
-
"TCH005", # Found empty type-checking block
394
-
"TCH010", # Invalid string member in `X | Y`-style union type
360
+
"TCH", # flake8-type-checking
395
361
# flake8-todos ('TD')
396
362
# "TD001", # Invalid TODO tag: `{tag}`
397
363
# "TD003", # Missing issue link on the line following this TODO
@@ -407,46 +373,7 @@ select = [
407
373
# Trio is not used in Sphinx
408
374
# tryceratops ('TRY')
409
375
# NOT YET USED
410
-
# pyupgrade ('UP')
411
-
"UP001", # `__metaclass__ = type` is implied
412
-
"UP003", # Use `{}` instead of `type(...)`
413
-
"UP004", # Class `{name}` inherits from `object`
414
-
"UP005", # `{alias}` is deprecated, use `{target}`
415
-
"UP006", # Use `{to}` instead of `{from}` for type annotation
416
-
"UP007", # Use `X | Y` for type annotations
417
-
"UP008", # Use `super()` instead of `super(__class__, self)`
418
-
"UP009", # UTF-8 encoding declaration is unnecessary
419
-
"UP010", # Unnecessary `__future__` import `{import}` for target Python version
420
-
"UP011", # Unnecessary parentheses to `functools.lru_cache`
421
-
"UP012", # Unnecessary call to `encode` as UTF-8
422
-
"UP013", # Convert `{name}` from `TypedDict` functional to class syntax
423
-
"UP014", # Convert `{name}` from `NamedTuple` functional to class syntax
424
-
"UP015", # Unnecessary open mode parameters
425
-
"UP017", # Use `datetime.UTC` alias
426
-
"UP018", # Unnecessary `{literal_type}` call (rewrite as a literal)
427
-
"UP019", # `typing.Text` is deprecated, use `str`
428
-
"UP020", # Use builtin `open`
429
-
"UP021", # `universal_newlines` is deprecated, use `text`
430
-
"UP022", # Sending `stdout` and `stderr` to `PIPE` is deprecated, use `capture_output`
431
-
"UP023", # `cElementTree` is deprecated, use `ElementTree`
432
-
"UP024", # Replace aliased errors with `OSError`
433
-
"UP025", # Remove unicode literals from strings
434
-
"UP026", # `mock` is deprecated, use `unittest.mock`
435
-
"UP027", # Replace unpacked list comprehension with a generator expression
436
-
"UP028", # Replace `yield` over `for` loop with `yield from`
437
-
"UP029", # Unnecessary builtin import: `{import}`
438
-
"UP030", # Use implicit references for positional format fields
439
-
# "UP031", # Use format specifiers instead of percent format
440
-
# "UP032", # Use f-string instead of `format` call
441
-
"UP033", # Use `@functools.cache` instead of `@functools.lru_cache(maxsize=None)`
442
-
"UP034", # Avoid extraneous parentheses
443
-
"UP035", # Import from `{target}` instead: {names}
444
-
"UP036", # Version block is outdated for minimum Python version
445
-
"UP037", # Remove quotes from type annotation
446
-
"UP038", # Use `X | Y` in `{}` call instead of `(X, Y)`
447
-
"UP039", # Unnecessary parentheses after class definition
448
-
"UP040", # Type alias `{name}` uses `TypeAlias` annotation instead of the `type` keyword
449
-
"UP041", # Replace aliased errors with `TimeoutError`
0 commit comments