1616 git-depth : 0 # Depth to search for tags.
1717
1818jobs :
19- black :
19+ ruff :
2020 runs-on : ubuntu-latest
2121 steps :
2222 - uses : actions/checkout@v3
23- - name : Install Black
24- run : pip install black
25- - name : Run Black
26- run : black --check --diff examples/ scripts/ tcod/ tests/ *.py
27-
28- isort :
29- runs-on : ubuntu-latest
30- steps :
31- - uses : actions/checkout@v3
32- - name : Install isort
33- run : pip install isort
34- - name : isort
35- uses : liskin/gh-problem-matcher-wrap@v2
36- with :
37- linters : isort
38- run : isort scripts/ tcod/ tests/ examples/ --check --diff
23+ - name : Install Ruff
24+ run : pip install ruff
25+ - name : Ruff Check
26+ run : ruff check . --fix-only --exit-non-zero-on-fix --output-format=github
27+ - name : Ruff Format
28+ run : ruff format . --check
3929
4030 mypy :
4131 runs-on : ubuntu-latest
7666
7767 # This makes sure that the latest versions of the SDL headers parse correctly.
7868 parse_sdl :
79- needs : [black, isort , mypy]
69+ needs : [ruff , mypy]
8070 runs-on : ${{ matrix.os }}
8171 strategy :
8272 matrix :
10090 SDL_VERSION : ${{ matrix.sdl-version }}
10191
10292 build :
103- needs : [black, isort , mypy]
93+ needs : [ruff , mypy]
10494 runs-on : ${{ matrix.os }}
10595 strategy :
10696 matrix :
@@ -164,7 +154,7 @@ jobs:
164154 retention-days : 7
165155
166156 test-docs :
167- needs : [black, isort , mypy]
157+ needs : [ruff , mypy]
168158 runs-on : ubuntu-latest
169159 steps :
170160 - name : Install APT dependencies
@@ -189,7 +179,7 @@ jobs:
189179 run : python -m sphinx -T -E -W --keep-going . _build/html
190180
191181 isolated : # Test installing the package from source.
192- needs : [black, isort , mypy, sdist]
182+ needs : [ruff , mypy, sdist]
193183 runs-on : ${{ matrix.os }}
194184 strategy :
195185 matrix :
@@ -219,7 +209,7 @@ jobs:
219209 python -c "import tcod.context"
220210
221211 linux-wheels :
222- needs : [black, isort , mypy]
212+ needs : [ruff , mypy]
223213 runs-on : " ubuntu-latest"
224214 strategy :
225215 matrix :
@@ -268,7 +258,7 @@ jobs:
268258 retention-days : 7
269259
270260 build-macos :
271- needs : [black, isort , mypy]
261+ needs : [ruff , mypy]
272262 runs-on : " macos-11"
273263 strategy :
274264 fail-fast : true
0 commit comments