Skip to content
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

Use ruff as the code formatter #257

Merged
merged 1 commit into from
Nov 13, 2023
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
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