diff --git a/.ruff.toml b/.ruff.toml index d8473ab99ee..1d0f9b88f3f 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -179,8 +179,8 @@ select = [ "PLC0414", # Import alias does not rename original package # "PLC0415", # `import` should be at the top-level of a file "PLC1901", # `{existing}` can be simplified to `{replacement}` as an empty string is falsey - "PLC2401", # {kind} name `{name}` contains a non-ASCII character, consider renaming it - "PLC2403", # Module alias `{name}` contains a non-ASCII character, use an ASCII-only alias + "PLC2401", # {kind} name `{name}` contains a non-ASCII character + "PLC2403", # Module alias `{name}` contains a non-ASCII character # "PLC2701", # Private name import `{name}` from external module `{module}` "PLC2801", # Unnecessary dunder call to `{method}`. {replacement}. "PLC3002", # Lambda expression called directly. Execute the expression inline instead. @@ -189,7 +189,7 @@ select = [ "PLE0101", # Explicit return in `__init__` "PLE0116", # `continue` not supported inside `finally` clause "PLE0117", # Nonlocal name `{name}` found without binding - "PLE0118", # Name `{name}` is used prior to global declaration on line {line} + "PLE0118", # Name `{name}` is used prior to global declaration on {row} "PLE0241", # Duplicate base `{base}` for class `{class}` "PLE0302", # The special method `{}` expects {}, {} {} given "PLE0307", # `__str__` does not return `str` @@ -198,7 +198,7 @@ select = [ "PLE1142", # `await` should be used within an async function "PLE1205", # Too many arguments for `logging` format string "PLE1206", # Not enough arguments for `logging` format string - "PLE1300", # Unsupported format character '{}' + "PLE1300", # Unsupported format character '{format_char}' "PLE1307", # Format type does not match argument type "PLE1310", # String `{strip}` call contains duplicate characters (did you mean `{removal}`?) "PLE1507", # Invalid type for initial `os.getenv` argument; expected `str` @@ -210,21 +210,21 @@ select = [ "PLE2514", # Invalid unescaped character NUL, use "\0" instead "PLE2515", # Invalid unescaped character zero-width-space, use "\u200B" instead # pylint ('PLR') -# "PLR0124", # Name compared with itself, consider replacing `{left} {} {right}` - "PLR0133", # Two constants compared in a comparison, consider replacing `{left_constant} {} {right_constant}` +# "PLR0124", # Name compared with itself, consider replacing `{actual}` + "PLR0133", # Two constants compared in a comparison, consider replacing `{left_constant} {op} {right_constant}` "PLR0206", # Cannot have defined parameters for properties "PLR0402", # Use `from {module} import {name}` in lieu of alias # "PLR0911", # Too many return statements ({returns} > {max_returns}) # "PLR0912", # Too many branches ({branches} > {max_branches}) -# "PLR0913", # Too many arguments to function call ({c_args} > {max_args}) +# "PLR0913", # Too many arguments in function definition ({c_args} > {max_args}) # "PLR0915", # Too many statements ({statements} > {max_statements}) "PLR1711", # Useless `return` statement at end of function -# "PLR1714", # Consider merging multiple comparisons: `{expr}`. Use a `set` if the elements are hashable. +# "PLR1714", # Consider merging multiple comparisons: `{expression}`. Use a `set` if the elements are hashable. "PLR1722", # Use `sys.exit()` instead of `{name}` -# "PLR2004", # Magic value used in comparison, consider replacing {value} with a constant variable +# "PLR2004", # Magic value used in comparison, consider replacing `{value}` with a constant variable # "PLR5501", # Use `elif` instead of `else` then `if`, to reduce indentation # pylint ('PLW') - "PLW0120", # `else` clause on loop without a `break` statement; remove the `else` and de-indent all the code inside it + "PLW0120", # `else` clause on loop without a `break` statement; remove the `else` and dedent its contents "PLW0127", # Self-assignment of variable `{name}` "PLW0129", # Asserting on an empty string literal will never pass "PLW0131", # Named expression used without context @@ -235,7 +235,7 @@ select = [ "PLW1508", # Invalid type for environment variable default; expected `str` or `None` "PLW1509", # `preexec_fn` argument is unsafe when using threads # "PLW2901", # Outer {outer_kind} variable `{name}` overwritten by inner {inner_kind} target - "PLW3301", # Nested `{}` calls can be flattened + "PLW3301", # Nested `{func}` calls can be flattened # flake8-pytest-style ('PT') "PT", # flake8-use-pathlib ('PTH')