Skip to content

Commit 3974cb7

Browse files
committed
Use ruff for checking / linting
1 parent f3a7046 commit 3974cb7

4 files changed

Lines changed: 23 additions & 33 deletions

File tree

.pre-commit-config.yaml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,15 @@ repos:
66
args: [--markdown-linebreak-ext=md]
77
- id: end-of-file-fixer
88
- id: debug-statements
9-
- repo: https://github.com/pycqa/isort
10-
rev: 5.10.1
11-
hooks:
12-
- id: isort
139
- repo: https://github.com/psf/black
1410
rev: "22.10.0"
1511
hooks:
1612
- id: black
17-
- repo: https://github.com/PyCQA/flake8
18-
rev: "6.0.0"
19-
hooks:
20-
- id: flake8
21-
additional_dependencies:
22-
- flake8-comprehensions
23-
- flake8-bugbear
24-
- repo: https://github.com/asottile/pyupgrade
25-
rev: v3.2.2
26-
hooks:
27-
- id: pyupgrade
28-
args: [--py37-plus]
2913
- repo: https://github.com/pre-commit/mirrors-mypy
3014
rev: 'v0.991'
3115
hooks:
3216
- id: mypy
17+
- repo: https://github.com/charliermarsh/ruff-pre-commit
18+
rev: 'v0.0.238'
19+
hooks:
20+
- id: ruff

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,22 @@ version_scheme = "post-release"
77

88
[tool.black]
99
target-version = ['py37']
10+
11+
[tool.ruff]
12+
select = [
13+
"E",
14+
"F",
15+
"W",
16+
"B0",
17+
"I",
18+
"UP",
19+
# "N",
20+
"C4",
21+
"PT",
22+
# "SIM",
23+
"TID",
24+
]
25+
target-version = "py37"
26+
27+
[tool.ruff.isort]
28+
force-single-line = true

setup.cfg

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
[flake8]
2-
exclude = docs/conf.py
3-
extend-ignore =
4-
# Black-incompatible colon spacing.
5-
E203,
6-
# Line jump before binary operator.
7-
W503,
8-
max-line-length = 88
9-
10-
[isort]
11-
force_single_line=true
12-
131
[tool:pytest]
142
addopts =
153
-vv

tox.ini

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,3 @@ deps =
99
images: Pillow
1010
commands = pytest --cov barcode
1111
usedevelop = True
12-
13-
[flake8]
14-
exclude=.tox,build,.eggs
15-
application-import-names=barcode,tests
16-
import-order-style=smarkets

0 commit comments

Comments
 (0)