Skip to content

Commit

Permalink
pre-commit-config: replace black with ruff-format
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Nov 10, 2023
1 parent edc187e commit 16f046d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ repos:
rev: v0.1.1
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
Expand All @@ -39,11 +40,6 @@ 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:
Expand Down
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

0 comments on commit 16f046d

Please sign in to comment.