Skip to content

Commit 4200898

Browse files
committed
pre-commit: Replace flake8, isort, and pyupgrade with ruff
1 parent 2ea9442 commit 4200898

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

Diff for: .pre-commit-config.yaml

+4-12
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,8 @@ repos:
1010
- id: end-of-file-fixer
1111
exclude: '.*\.pth$'
1212
- id: debug-statements
13-
- repo: https://github.com/PyCQA/isort
14-
rev: 5.12.0
13+
- repo: https://github.com/charliermarsh/ruff-pre-commit
14+
rev: v0.0.253
1515
hooks:
16-
- id: isort
17-
- repo: https://github.com/asottile/pyupgrade
18-
rev: v3.3.1
19-
hooks:
20-
- id: pyupgrade
21-
args: [--py37-plus]
22-
- repo: https://github.com/PyCQA/flake8
23-
rev: 6.0.0
24-
hooks:
25-
- id: flake8
16+
- id: ruff
17+
# args: [--fix, --exit-non-zero-on-fix]

Diff for: .ruff.toml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# [tool.ruff] # <- TODO Uncomment when migrating to pyproject.toml
2+
exclude = [
3+
".eggs",
4+
".tox",
5+
"build",
6+
"ci/templates",
7+
"dist",
8+
]
9+
line-length = 140
10+
select = [
11+
"E",
12+
"F",
13+
"I",
14+
"PLC",
15+
"PLE",
16+
"UP",
17+
"W",
18+
]
19+
target-version = "py37"
20+
21+
# [tool.ruff.isort] # <- TODO Uncomment when migrating to pyproject.toml
22+
[isort]
23+
# default-section = "THIRDPARTY"
24+
force-single-line = true
25+
forced-separate = ["test_pytest_cov"]
26+
known-first-party = ["pytest_cov"]

Diff for: MANIFEST.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ prune examples/adhoc-layout/*.egg-info
77
prune examples/src-layout/src/*.egg-info
88

99
graft .github/workflows
10-
graft src
1110
graft ci
11+
graft src
1212
graft tests
1313

1414
include .bumpversion.cfg
1515
include .cookiecutterrc
1616
include .coveragerc
1717
include .editorconfig
18-
include tox.ini
19-
include .readthedocs.yml
2018
include .pre-commit-config.yaml
19+
include .readthedocs.yml
20+
include .ruff.toml
2121
include AUTHORS.rst
2222
include CHANGELOG.rst
2323
include CONTRIBUTING.rst
2424
include LICENSE
2525
include README.rst
26-
26+
include tox.ini
2727

2828
global-exclude *.py[cod] __pycache__/* *.so *.dylib

0 commit comments

Comments
 (0)