-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply more ruff rules #12980
base: main
Are you sure you want to change the base?
Apply more ruff rules #12980
Commits on Sep 28, 2024
-
Disable ruff/pyupgrade rule UP027
There's no evidence that generators are meaningfully faster than list comprehensions when combined with unpacking.
Configuration menu - View commit details
-
Copy full SHA for e2b2cb9 - Browse repository at this point
Copy the full SHA e2b2cb9View commit details
Commits on Oct 3, 2024
-
Apply ruff/pyupgrade preview rule UP031
UP031 Use format specifiers instead of percent format
Configuration menu - View commit details
-
Copy full SHA for c3ec9fe - Browse repository at this point
Copy the full SHA c3ec9feView commit details -
Disable ruff/pyupgrade rule UP038
Using `X | Y` in `isinstance` is slower and more verbose.
Configuration menu - View commit details
-
Copy full SHA for 03a459c - Browse repository at this point
Copy the full SHA 03a459cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5d09fe9 - Browse repository at this point
Copy the full SHA 5d09fe9View commit details -
RUF010 Use explicit conversion flag
Configuration menu - View commit details
-
Copy full SHA for 23aa730 - Browse repository at this point
Copy the full SHA 23aa730View commit details -
RUF012 Mutable class attributes should be annotated with `typing.ClassVar`
Configuration menu - View commit details
-
Copy full SHA for 1a2e4a1 - Browse repository at this point
Copy the full SHA 1a2e4a1View commit details -
RUF019 Unnecessary key check before dictionary access
Configuration menu - View commit details
-
Copy full SHA for ab5e818 - Browse repository at this point
Copy the full SHA ab5e818View commit details -
Configuration menu - View commit details
-
Copy full SHA for 445f23b - Browse repository at this point
Copy the full SHA 445f23bView commit details -
Apply ruff/flake8-executable rule EXE002
EXE002 The file is executable but no shebang is present
Configuration menu - View commit details
-
Copy full SHA for 119c012 - Browse repository at this point
Copy the full SHA 119c012View commit details -
Apply ruff/flake8-pie rule PIE810
PIE810 Call `startswith` or `endswith` once with a `tuple`
Configuration menu - View commit details
-
Copy full SHA for 464b013 - Browse repository at this point
Copy the full SHA 464b013View commit details -
Configuration menu - View commit details
-
Copy full SHA for a99ce4f - Browse repository at this point
Copy the full SHA a99ce4fView commit details -
Apply ruff/flake8-pyi rule PYI032
PYI032 Prefer `object` to `Any` for the second parameter to `__eq__`
Configuration menu - View commit details
-
Copy full SHA for 8c49d19 - Browse repository at this point
Copy the full SHA 8c49d19View commit details -
Apply ruff/flake8-pyi rule PYI036
PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None` PYI036 The second argument in `__exit__` should be annotated with `object` or `BaseException | None` PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None`
Configuration menu - View commit details
-
Copy full SHA for 19c2957 - Browse repository at this point
Copy the full SHA 19c2957View commit details -
Configuration menu - View commit details
-
Copy full SHA for 31eb8f3 - Browse repository at this point
Copy the full SHA 31eb8f3View commit details -
Apply ruff/flake8-raise rule RSE102
RSE102 Unnecessary parentheses on raised exception
Configuration menu - View commit details
-
Copy full SHA for 415c47c - Browse repository at this point
Copy the full SHA 415c47cView commit details -
Apply ruff/flake8-return rule RET501
RET501 Do not explicitly `return None` in function if it is the only possible return value
Configuration menu - View commit details
-
Copy full SHA for 787ff00 - Browse repository at this point
Copy the full SHA 787ff00View commit details -
Apply ruff/flake8-return rule RET503
RET503 Missing explicit `return` at the end of function able to return non-`None` value
Configuration menu - View commit details
-
Copy full SHA for 9d2ca1a - Browse repository at this point
Copy the full SHA 9d2ca1aView commit details -
Apply ruff/flake8-slots rule SLOT000
SLOT000 Subclasses of `str` should define `__slots__`
Configuration menu - View commit details
-
Copy full SHA for 952aa73 - Browse repository at this point
Copy the full SHA 952aa73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e855a0 - Browse repository at this point
Copy the full SHA 1e855a0View commit details -
Apply ruff/flake8-simplify rule SIM103
SIM103 Return the (negated) condition directly
Configuration menu - View commit details
-
Copy full SHA for 6c9a8c5 - Browse repository at this point
Copy the full SHA 6c9a8c5View commit details -
Apply ruff/flake8-simplify rule SIM110
SIM110 Use `return any(getattr(req, option, None) for req in reqs)` instead of `for` loop
Configuration menu - View commit details
-
Copy full SHA for 7adbec6 - Browse repository at this point
Copy the full SHA 7adbec6View commit details -
Apply ruff/flake8-simplify rule SIM118
SIM118 Use `key in dict` instead of `key in dict.keys()`
Configuration menu - View commit details
-
Copy full SHA for c60e20b - Browse repository at this point
Copy the full SHA c60e20bView commit details -
Apply ruff/flake8-type-checking rule TCH001
TCH001 Move application import `.base.Requirement` into a type-checking block
Configuration menu - View commit details
-
Copy full SHA for 5c354a6 - Browse repository at this point
Copy the full SHA 5c354a6View commit details -
Apply ruff/flake8-type-checking rule TCH002
TCH002 Move third-party import `pip._vendor.resolvelib.structs.DirectedGraph` into a type-checking block
Configuration menu - View commit details
-
Copy full SHA for d66831d - Browse repository at this point
Copy the full SHA d66831dView commit details -
Apply ruff/flake8-type-checking rule TCH003
TCH003 Move standard library import `distutils.cmd.Command` into a type-checking block
Configuration menu - View commit details
-
Copy full SHA for 033dde8 - Browse repository at this point
Copy the full SHA 033dde8View commit details -
Apply ruff/pygrep-hooks rule PGH003
PGH003 Use specific rule codes when ignoring type issues
Configuration menu - View commit details
-
Copy full SHA for b19669f - Browse repository at this point
Copy the full SHA b19669fView commit details -
Apply ruff/pygrep-hooks rule PGH004
PGH004 Use specific rule codes when using `noqa`
Configuration menu - View commit details
-
Copy full SHA for 65833a9 - Browse repository at this point
Copy the full SHA 65833a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 27670e9 - Browse repository at this point
Copy the full SHA 27670e9View commit details -
Apply ruff/flake8-comprehensions preview rule C419
C419 Unnecessary list comprehension
Configuration menu - View commit details
-
Copy full SHA for ae41609 - Browse repository at this point
Copy the full SHA ae41609View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b45393 - Browse repository at this point
Copy the full SHA 0b45393View commit details