Skip to content

Commit 3581030

Browse files
committed
Update isort and black in run_formatters script to Ruff
1 parent 735c2f9 commit 3581030

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

tests/run_formatters.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66

77
def install_requirements():
88
print("\nInstalling requirements...")
9-
return subprocess.run((sys.executable, "-m", "pip", "install", "--upgrade", "isort", "black"))
9+
return subprocess.run((sys.executable, "-m", "pip", "install", "--upgrade", "ruff"))
1010

1111

12-
def run_isort():
13-
print("\nRunning isort...")
14-
return subprocess.run((sys.executable, "-m", "isort", "."))
12+
def run_ruff_fix():
13+
print("\nRunning Ruff check --fix...")
14+
return subprocess.run((sys.executable, "-m", "ruff", "--fix"))
1515

1616

17-
def run_black():
18-
print("\nRunning Black...")
19-
return subprocess.run((sys.executable, "-m", "black", "."))
17+
def run_ruff_format():
18+
print("\nRunning Ruff format...")
19+
return subprocess.run((sys.executable, "-m", "ruff", "format"))
2020

2121

2222
def main():
@@ -26,8 +26,8 @@ def main():
2626

2727
install_requirements().check_returncode()
2828
results = (
29-
run_isort(),
30-
run_black(),
29+
run_ruff_fix(),
30+
run_ruff_format(),
3131
)
3232
if sum([result.returncode for result in results]) > 0:
3333
print("\nOne or more tests failed. See above for details.")

0 commit comments

Comments
 (0)