Skip to content

Commit

Permalink
Use ruff instead of flake8 and black
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Feb 21, 2024
1 parent 2ba0254 commit 5b41798
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 33 deletions.
6 changes: 0 additions & 6 deletions .isort.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
recursive-include docs *
recursive-include tests *
include pytest.ini AUTHORS.rst CODE_OF_CONDUCT.md pyproject.toml LICENSE README.rst tox.ini .coveragerc .isort.cfg .readthedocs.yaml
include pytest.ini AUTHORS.rst CODE_OF_CONDUCT.md pyproject.toml LICENSE README.rst tox.ini .coveragerc .readthedocs.yaml
prune docs/_build
global-exclude *.pyc
prune __pycache__
44 changes: 27 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
[tool.black]
line-length = 88
target-version = ['py37', 'py38', 'py39', 'py310', 'py311']
include = '\.pyi?$'
exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| build
| dist
)/
'''
[tool.ruff]
extend-exclude = [
"__pycache__",
]

[tool.ruff.lint]
select = [
# pycodestyle
"E", "W",
# flake8
"F",
# isort
"I",
# pytest style
# "PT",
# eradicate commented code
# "ERA",
# ruff lint
# "RUF",
]
ignore = [
# `format` will wrap lines.
"E501",
]

[tool.ruff.lint.isort]
known-first-party = ["dockerflow"]
4 changes: 1 addition & 3 deletions tests/requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
flake8
flake8-black
flake8-isort
ruff
twine
check-manifest
8 changes: 2 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,8 @@ pip_pre = false
basepython = python3.8
deps = -rtests/requirements/lint.txt
commands =
flake8 src/dockerflow tests/
ruff check src/ tests/
ruff format src/ tests/
check-manifest -v
python setup.py sdist
twine check dist/*

[flake8]
exclude =
.tox
ignore=E501,E127,E128,E124

0 comments on commit 5b41798

Please sign in to comment.