Skip to content

Commit

Permalink
chore: replace isort and flak8 by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
fyhertz committed Feb 28, 2023
1 parent 4cc21a9 commit 771dba6
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 90 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,8 @@ jobs:
- name: Run black
run: poetry run black src tests --check

- name: Run isort
run: poetry run isort src tests --check

- name: Run flake8
run: poetry run flake8 src tests
- name: Run ruff
run: poetry run ruff src tests

- name: Run mypy
run: poetry run mypy --show-error-codes src
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ repos:
language: system
types: [python]
pass_filenames: false
- id: isort
name: isort
entry: poetry run isort src tests
- id: ruff
name: ruff
entry: poetry run ruff src tests --fix
language: system
types: [python]
pass_filenames: false
Expand Down
100 changes: 28 additions & 72 deletions poetry.lock

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

24 changes: 19 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,21 @@ pytest = "*"
mypy = "*"
taskipy = "*"
pytest-cov = "*"
flake8 = "*"
black = "*"
isort = "*"
safety = "*"
types-aiofiles = "*"
types-PyYAML = "*"
pytest-asyncio = ">=0.18.0"
poetry-dynamic-versioning = ">=0.13.0"
fastapi = "^0.90.0"

[tool.poetry.group.dev.dependencies]
ruff = "^0.0.253"

[tool.taskipy.tasks]
check = """
isort src tests\
&& black src tests\
&& flake8 src tests\
black src tests\
&& ruff src tests --fix\
&& mypy src\
&& pytest --cov src tests\
"""
Expand Down Expand Up @@ -107,3 +107,17 @@ pattern = "(?x)^(?P<base>\\d+\\.\\d+\\.\\d+)(-?((?P<stage>[a-zA-Z]+)\\.?(?P<revi

[tool.poetry-dynamic-versioning.substitution]
files = ["src/ops2deb/__init__.py"]

[tool.ruff]
line-length = 90
select = [
"E",
"F",
"W",
"I001",
]
src = ["src", "tests"]

[tool.ruff.per-file-ignores]
"__init__.py" = ["F401"]
"src/ops2deb/templates.py" = ["E501"]
5 changes: 0 additions & 5 deletions setup.cfg

This file was deleted.

0 comments on commit 771dba6

Please sign in to comment.