Skip to content

Commit 5253993

Browse files
authored
Merge pull request #126 from Gepetto/dependabot/pip/ruff-0.7.2
Bump ruff from 0.4.7 to 0.7.2
2 parents 480260f + 9ae68ec commit 5253993

File tree

4 files changed

+932
-917
lines changed

4 files changed

+932
-917
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
[![Tests](https://github.com/gepetto/gepetuto/actions/workflows/tests.yml/badge.svg)](https://github.com/gepetto/gepetuto/actions/workflows/tests.yml)
66
[![Release](https://github.com/gepetto/gepetuto/actions/workflows/release.yml/badge.svg)](https://github.com/gepetto/gepetuto/actions/workflows/release.yml)
77

8-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
98
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
109
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v1.json)](https://github.com/charliermarsh/ruff)
1110

gepetuto/lint.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@ def lint(files: Dict[int, List[Path]], **kwargs):
2020
def lint_file(file: Path, check):
2121
"""Lint python script."""
2222
LOG.debug("Checking %s", file)
23-
if check:
24-
check_call(["isort", file, "--check"])
25-
check_call(["black", file, "--check"])
26-
check_call(["ruff", "--fix", file, "--exit-non-zero-on-fix"])
27-
else:
28-
check_call(["isort", file])
29-
check_call(["black", file])
30-
check_call(["ruff", "--fix", file])
23+
check_call(
24+
["ruff", "check", "--fix", f"{file}"]
25+
+ (["--exit-non-zero-on-fix"] if check else []),
26+
)
27+
check_call(["ruff", "format", f"{file}"])

0 commit comments

Comments
 (0)