Skip to content

Commit

Permalink
chore: Use ruff format instead of black
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Oct 25, 2023
1 parent fbac455 commit 2390191
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
7 changes: 2 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
ci:
autoupdate_schedule: quarterly
repos:
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.292
rev: v0.1.2
hooks:
- id: ruff
# args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
8 changes: 2 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,14 @@
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 119

[tool.isort]
profile = "black"

[tool.ruff]
line-length = 119
select = ["ALL"]
target-version = "py310"
ignore = [
"ANN", "COM", "EM",
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"W191", "E501", "D206", "Q000", "Q001", "Q002", "Q003", "ISC001",
"D100", "D104", "D200", "D203", "D205", "D212", "D400", "D415",
"ARG001", "ARG002", # unused arguments (callbacks)
"PLR0913", # many arguments (decorators)
Expand Down
4 changes: 3 additions & 1 deletion tests/clients/test_async_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ def test_decode_invalid(short_message, timer, caplog):
caplog.set_level(logging.INFO)

consumer = async_consumer(
on_message_callback=ack_warner, queue="q", decode=functools.partial(decode, 10) # IndexError
on_message_callback=ack_warner,
queue="q",
decode=functools.partial(decode, 10), # IndexError
)
consumer.start()

Expand Down

0 comments on commit 2390191

Please sign in to comment.