Skip to content

Commit

Permalink
Use ruff as the code formatter (#257)
Browse files Browse the repository at this point in the history
  • Loading branch information
bieniu committed Nov 13, 2023
1 parent 7a38e11 commit 41c91ed
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
repos:
- repo: https://github.com/charliermarsh/ruff-pre-commit
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
args:
- --fix
- repo: https://github.com/psf/black
rev: 23.11.0
hooks:
- id: black
args:
- --safe
- --quiet
files: ^((gios|tests)/.+)?[^/]+\.py$
- id: ruff-format
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ ignore = [
"D407", # Section name underlining
"D411", # Missing blank line before section
"E731", # Do not assign a lambda expression, use a def
"ISC001", # Single line implicit string concatenation
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"PT023", # Use `@pytest.mark.asyncio()` over `@pytest.mark.asyncio`
Expand Down
1 change: 0 additions & 1 deletion requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
aioresponses==0.7.4
black==23.10.1
coverage==7.3.2
mypy==1.6.1
pytest-asyncio==0.21.1
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ basepython = python3
ignore_errors = True
commands =
ruff check .
black --check .
ruff format --check .
deps =
-rrequirements.txt
-rrequirements-test.txt
Expand Down

0 comments on commit 41c91ed

Please sign in to comment.