Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ repos:
- from __future__ import annotations

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.1
rev: v0.1.5
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
Expand All @@ -39,17 +40,12 @@ repos:
args:
- --py36-plus

- repo: https://github.com/psf/black
rev: "23.10.1"
hooks:
- id: black

- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.15
hooks:
- id: validate-pyproject

- repo: https://github.com/fsouza/mirrors-pyright
rev: v1.1.332
rev: v1.1.335
hooks:
- id: pyright
8 changes: 4 additions & 4 deletions autoflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,7 @@ def filter_code(
undefined_names: list[str] = []
if expand_star_imports and not (
# See explanations in #18.
re.search(r"\b__all__\b", source)
or re.search(r"\bdel\b", source)
re.search(r"\b__all__\b", source) or re.search(r"\bdel\b", source)
):
marked_star_import_line_numbers = frozenset(
star_import_used_line_numbers(messages),
Expand Down Expand Up @@ -1503,8 +1502,9 @@ def _main(
if not success:
return 1

if args["remove_rhs_for_unused_variables"] and not (
args["remove_unused_variables"]
if (
args["remove_rhs_for_unused_variables"]
and not (args["remove_unused_variables"])
):
_LOGGER.error(
"Using --remove-rhs-for-unused-variables only makes sense when "
Expand Down