nathanchance · GitHub

@nathanchance

@nathanchance

Closed

nickdesaulniers

nickdesaulniers

nickdesaulniers

This is an opinionated set of warnings from the full list that ruff
supports.
Link: https://beta.ruff.rs/docs/rules/
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Fixes a ruff warning:
  generate.py:25:17: RUF005 [*] Consider `[*trees, 'all']` instead of concatenation
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Fixes new ruff warning:
  check_logs.py:148:13: PLW2901 Outer for loop variable `line` overwritten by inner assignment target
This warning is in pylint as well, but it is not enabled under the
default configuration. Additionally, simplify the check for an empty
line. We can use the walrus operator plus the truthiness of the empty
string instead of assigning and checking the length separately.
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>

@nathanchance

nickdesaulniers

@nathanchance

@nathanchance

Read the original on github.com ↗