Skip to content

Commit

Permalink
Migrate to ruff format (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorJohn authored Nov 12, 2023
1 parent d217ab2 commit 47651d9
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 55 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ jobs:
run: poetry install --no-interaction
- name: Lint
run: |
poetry run ruff aiogqlc tests
poetry run black aiogqlc tests --check
poetry run ruff check aiogqlc tests
poetry run ruff format --check aiogqlc tests
poetry run mypy aiogqlc
8 changes: 3 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
repos:
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
- id: ruff-format
args: [--check]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
additional_dependencies:
- 'strawberry-graphql==0.213.0'
- "strawberry-graphql==0.213.0"
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ dev:

.PHONY: format
format:
poetry run ruff aiogqlc tests --fix
poetry run black aiogqlc tests
poetry run ruff check --fix aiogqlc tests
poetry run ruff format aiogqlc tests

.PHONY: lint
lint:
poetry run ruff aiogqlc tests
poetry run black aiogqlc tests --check
poetry run ruff check aiogqlc tests
poetry run ruff format --check aiogqlc tests
poetry run mypy aiogqlc

.PHONY: test
Expand Down
44 changes: 1 addition & 43 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ python = "^3.8"
aiohttp = "^3.6.0"

[tool.poetry.group.dev.dependencies]
black = "^23.7.0"
pre-commit = "^3.4.0"
pytest = "^7.4.1"
pytest-cov = "^4.1.0"
Expand Down

0 comments on commit 47651d9

Please sign in to comment.