Skip to content

Commit 5197260

Browse files
committed
railjson_generator: add ruff
Signed-off-by: Jean SIMARD <[email protected]>
1 parent 550500a commit 5197260

24 files changed

+446
-348
lines changed

.github/workflows/build.yml

+3-18
Original file line numberDiff line numberDiff line change
@@ -244,26 +244,11 @@ jobs:
244244
cd python/railjson_generator
245245
poetry install
246246
247-
- name: Flake8
248-
run: |
249-
cd python/railjson_generator
250-
poetry run pflake8 --config ./pyproject.toml --output-file flake8.xml --format junit-xml
251-
252-
- name: Publish flake8 report
253-
uses: mikepenz/action-junit-report@v5
254-
if: failure()
255-
with:
256-
report_paths: flake8.xml
257-
258-
- name: Black
259-
run: |
260-
cd python/railjson_generator
261-
poetry run black . --check
262-
263-
- name: Isort
247+
- name: Ruff
264248
run: |
265249
cd python/railjson_generator
266-
poetry run isort . --check
250+
poetry run ruff check
251+
poetry run ruff format --check
267252
268253
- name: Pytype
269254
run: |

python/railjson_generator/poetry.lock

+24-201
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/railjson_generator/pyproject.toml

+1-16
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,8 @@ pytest-cov = "^4.1.0"
1515
python = ">=3.9,<3.12"
1616

1717
[tool.poetry.group.dev.dependencies]
18-
black = "^24.4.2"
19-
flake8-formatter-junit-xml = "^0.0.6"
20-
isort = "^5.12.0"
21-
pyproject-flake8 = "^6.0.0.post1"
2218
pytype = { platform = "linux", version = "^2023.10.17" }
23-
24-
[tool.flake8]
25-
ignore = "W503,E203"
26-
max-line-length = 120
27-
exclude = [".venv/"]
28-
29-
[tool.black]
30-
line-length = 120
31-
32-
[tool.isort]
33-
profile = "black"
34-
multi_line_output = 3
19+
ruff = "0.9.5"
3520

3621
[tool.pytype]
3722
inputs = ["railjson_generator"]

0 commit comments

Comments
 (0)