Skip to content

Commit 597f811

Browse files
committed
Update isort and black in run_formatters script to Ruff
1 parent 9c5664c commit 597f811

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

stubs/vispy/util/fonts/__init__.pyi

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

77
__all__ = ["list_fonts"]
88

9-
from ._triage import list_fonts as list_fonts # noqa, analysis:ignore
10-
from ._vispy_fonts import _vispy_fonts as _vispy_fonts # noqa, analysis:ignore
9+
from ._triage import list_fonts as list_fonts # analysis:ignore
10+
from ._vispy_fonts import _vispy_fonts as _vispy_fonts # analysis:ignore

tests/run_hygiene.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)