Skip to content

Commit 28bedf8

Browse files
committed
refactor: migrate to Ruff linter
1 parent f824cb5 commit 28bedf8

File tree

2 files changed

+24
-16
lines changed

2 files changed

+24
-16
lines changed

.github/workflows/main.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ jobs:
1111
with:
1212
python-version: 3.12.4
1313
cache: "pip"
14-
- name: "installation"
14+
- name: "Install dependencies"
1515
run: |
1616
pip install -r requirements.txt -r requirements.dev.txt
17-
- name: "black"
18-
run: black . --check --diff --color
19-
- name: "isort"
20-
run: isort . --check --diff
21-
- name: "mypy"
17+
- name: "Ruff checks"
18+
continue-on-error: true
19+
run: ruff check . --output-format=full --diff
20+
- name: "Format check"
21+
continue-on-error: true
22+
run: ruff format . --check --diff
23+
- name: "Mypy"
2224
run: mypy
23-
- name: "pytests"
25+
- name: "Pytest"
2426
run: python -m pytest -v -m ci

pyproject.toml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,25 @@
11
[metadata]
2-
name = "PySATL_NMVM_Module "
2+
name = "PySATL_NMVM_Module"
33
author = "Engelsgeduld, Andreev Sergey, Sazonova Irina"
44
url = "https://github.com/Engelsgeduld/PySATL_NMVM_Module"
55

6-
[tool.isort]
7-
profile = "black"
8-
line_length = 120
9-
10-
[tool.black]
6+
[tool.ruff]
117
line-length = 120
8+
target-version = "py312"
9+
extend-include = ["*.ipynb"]
10+
format = { quote-style = "double" }
11+
12+
[tool.ruff.lint]
13+
select = [
14+
"E", "F", "W", "I",
15+
"UP", "C90",
16+
"NPY", "PD", "RUF"
17+
]
18+
ignore-init-module-imports = true
1219

1320
[tool.mypy]
1421
files = ["src"]
22+
exclude = ".*\\.ipynb"
1523
install_types = "True"
1624
non_interactive = "True"
1725
disallow_untyped_defs = "True"
@@ -27,6 +35,4 @@ no_implicit_optional = "False"
2735
[tool.pytest.ini_options]
2836
testpaths = ["tests"]
2937
addopts = ["--color=yes", "-s"]
30-
markers = [
31-
"ci: test that run on ci",
32-
]
38+
markers = ["ci: test that run on ci"]

0 commit comments

Comments
 (0)