Skip to content

Commit

Permalink
Merge pull request #26 from ikalnytskyi/chore/ruff
Browse files Browse the repository at this point in the history
Use Ruff instead of flake8/black
  • Loading branch information
ikalnytskyi authored May 5, 2024
2 parents 4391335 + 71dd62d commit 170d3eb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2

- name: Run pre-commit
run: python -m pip install tox && python -m tox -e pre-commit
- name: Run ruff
run: pipx run tox -e lint

test:
strategy:
Expand All @@ -44,4 +44,4 @@ jobs:
if: matrix.os == 'macos-latest'

- name: Run pytest
run: python -m pip install tox && python -m tox -e py3
run: pipx run tox -e py3
26 changes: 0 additions & 26 deletions .pre-commit-config.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ creds = "httpie_credential_store:CredsAuthPlugin"
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

[tool.ruff]
line-length = 88
target-version = "py38"
10 changes: 6 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py3, pre-commit
envlist = py3, lint

[testenv]
deps = poetry
Expand All @@ -8,8 +8,10 @@ commands =
poetry install -v
poetry run pytest -vv

[testenv:pre-commit]
[testenv:lint]
skip_install = true
deps = pre-commit
deps =
ruff >= 0.4.2, < 0.5.0
commands =
pre-commit run --all-files --show-diff-on-failure
ruff check {args:.}
ruff format --check --diff {args:.}

0 comments on commit 170d3eb

Please sign in to comment.