Skip to content

Commit 4b1c373

Browse files
committed
Replace black and isort with ruff
1 parent bcddf53 commit 4b1c373

File tree

2 files changed

+8
-28
lines changed

2 files changed

+8
-28
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,15 @@ jobs:
3333
pip install -v --editable '.[lint,test]'
3434
pip install "coveralls>=3.0.0"
3535
36-
- name: black check
36+
- name: ruff linter
3737
run: |
38-
python -m black --check --diff --color .
39-
40-
- name: black preview
41-
run: |
42-
python -m black --preview --diff --color .
38+
python -m ruff check src/gstools/
4339
44-
- name: isort check
40+
- name: ruff import check
4541
run: |
46-
python -m isort --check --diff --color .
42+
python -m ruff check --select I --diff src/gstools/
4743
48-
- name: ruff check
44+
- name: ruff format check
4945
run: |
5046
python -m ruff check src/gstools/
5147

pyproject.toml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@ plotting = [
7373
]
7474
rust = ["gstools_core>=1.0.0"]
7575
test = ["pytest-cov>=3"]
76-
lint = [
77-
"black>=24",
78-
"ruff",
79-
"isort[colors]",
80-
]
76+
lint = ["ruff"]
8177

8278
[project.urls]
8379
Changelog = "https://github.com/GeoStat-Framework/GSTools/blob/main/CHANGELOG.md"
@@ -107,21 +103,9 @@ include = [
107103
[tool.hatch.build.targets.wheel]
108104
packages = ["src/gstools"]
109105

110-
[tool.isort]
111-
profile = "black"
112-
multi_line_output = 3
113-
line_length = 79
114-
115-
[tool.black]
106+
[tool.ruff]
116107
line-length = 79
117-
target-version = [
118-
"py38",
119-
"py39",
120-
"py310",
121-
"py311",
122-
"py312",
123-
"py313",
124-
]
108+
target-version = "py38"
125109

126110
[tool.coverage]
127111
[tool.coverage.run]

0 commit comments

Comments
 (0)