Skip to content

Commit 81b5a1e

Browse files
committed
replace black/isort/flake8 with ruff
1 parent a0a10a2 commit 81b5a1e

File tree

4 files changed

+54
-57
lines changed

4 files changed

+54
-57
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,12 @@ repos:
2626
^.pytest_cache/
2727
)
2828
29-
- repo: https://github.com/PyCQA/isort
30-
rev: 5.12.0
29+
- repo: https://github.com/astral-sh/ruff-pre-commit
30+
rev: v0.3.3
3131
hooks:
32-
- id: isort
33-
34-
- repo: https://github.com/psf/black
35-
rev: 22.6.0
36-
hooks:
37-
- id: black
38-
39-
- repo: https://github.com/PyCQA/flake8
40-
rev: 6.1.0
41-
hooks:
42-
- id: flake8
43-
additional_dependencies:
44-
- setuptools
45-
- flake8-bugbear
46-
- flake8-comprehensions
47-
- flake8-debugger
48-
- flake8-logging-format
49-
- flake8-pytest-style
50-
- flake8-tidy-imports
32+
- id: ruff
33+
args: [ --fix ]
34+
- id: ruff-format
5135

5236
- repo: https://github.com/codespell-project/codespell
5337
rev: v2.1.0

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
lint: clean
2-
flake8 inoreader --format=pylint
2+
- pip install ruff codespell -q
3+
- ruff check inoreader/
4+
- codespell
5+
6+
format:
7+
- pip install ruff -q
8+
- ruff format inoreader/
39

410
clean:
511
- find . -iname "*__pycache__" | xargs rm -rf

pyproject.toml

Lines changed: 42 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,3 @@
1-
[tool.black]
2-
line-length = 100
3-
skip-string-normalization = true
4-
extend-exclude = '''
5-
/(
6-
# exclude migrations
7-
| migrations
8-
)/
9-
'''
10-
11-
[tool.coverage.report]
12-
exclude_lines = [
13-
"pragma: no cover",
14-
"def __repr__",
15-
"if typing.TYPE_CHECKING:",
16-
"if TYPE_CHECKING:",
17-
]
18-
19-
[tool.isort]
20-
multi_line_output = 3
21-
include_trailing_comma = true
22-
force_grid_wrap = 0
23-
use_parentheses = true
24-
ensure_newline_before_comments = true
25-
line_length = 100
26-
skip = [".ipython"]
27-
remove_redundant_aliases = true
28-
291
[project]
302
name = "python-inoreader"
313
version = "0.4.7"
@@ -60,3 +32,45 @@ inoreader = "inoreader.main:main"
6032

6133
[project.urls]
6234
Homepage = "https://github.com/Linusp/python-inoreader"
35+
36+
[tool.codespell]
37+
skip = "*.lock,./.tox,./.venv,./.git,./venv,./*.json,./*.jsonl,./*.yaml"
38+
quiet-level = 3
39+
ignore-words-list = "inoreader"
40+
count = ""
41+
42+
[tool.ruff]
43+
exclude = [
44+
".bzr",
45+
".direnv",
46+
".eggs",
47+
".git",
48+
".git-rewrite",
49+
".hg",
50+
".ipynb_checkpoints",
51+
".mypy_cache",
52+
".nox",
53+
".pants.d",
54+
".pyenv",
55+
".pytest_cache",
56+
".pytype",
57+
".ruff_cache",
58+
".svn",
59+
".tox",
60+
".venv",
61+
".vscode",
62+
"__pypackages__",
63+
"_build",
64+
"buck-out",
65+
"build",
66+
"dist",
67+
"node_modules",
68+
"site-packages",
69+
"venv",
70+
]
71+
line-length = 100
72+
indent-width = 4
73+
74+
[tool.ruff.lint]
75+
select = ["E", "F"]
76+
ignore = ["E201", "E202"]

setup.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)