Skip to content

Commit d55cf92

Browse files
committed
Removed pre-commit from CI linting job, using Ruff now directly
Updated CI to use ruff instead of calling pre-commit handler. Pre-commit should be used by software engineers to safeguard their commits locally. Also removed ruff deprecations in pyproject.toml.
1 parent 9832858 commit d55cf92

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/ci-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
with:
1919
python-version: "3.9" # the pre-commit is hooked in as 3.9
2020
- name: Install Python dependencies
21-
run: poetry install
22-
- name: Install pre-commit
23-
run: pip install pre-commit
24-
- name: Run linter
25-
run: pre-commit run -a
21+
run: poetry install --no-interaction
22+
- name: Run ruff
23+
run: |
24+
source $(poetry env info --path)/bin/activate
25+
ruff check --fix --exit-non-zero-on-fix --config pyproject.toml

pyproject.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,15 +142,14 @@ exclude_lines = [
142142
"raise NotImplementedError" # TODO: used in core/generic.py, not sure we need DbContainer
143143
]
144144

145-
[tool.ruff.flake8-type-checking]
146-
strict = true
147-
148145
[tool.ruff]
149146
target-version = "py39"
150147
line-length = 120
151148
fix = true
152-
fixable = ["I"]
153149
src = ["core", "modules/*"]
150+
151+
[tool.ruff.lint]
152+
fixable = ["I"]
154153
exclude = ["**/tests/**/*.py"]
155154
select = [
156155
# flake8-2020
@@ -197,6 +196,8 @@ ignore = [
197196
"INP001"
198197
]
199198

199+
[tool.ruff.lint.flake8-type-checking]
200+
strict = true
200201

201202
[tool.mypy]
202203
python_version = "3.9"

0 commit comments

Comments
 (0)