Skip to content

Commit 3d65835

Browse files
committed
Run ruff in CI
1 parent 98aa107 commit 3d65835

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ jobs:
2121
- name: Install Deps
2222
run: sudo apt-get install check libcppunit-dev
2323
- name: Install package
24-
run: python -m pip install -U '.[test,docs]'
24+
run: |
25+
python -m pip install ruff
26+
python -m pip install -U '.[test,docs]'
2527
- name: Build
2628
run: autoreconf -fi && ./configure && make
29+
- name: Run ruff check
30+
run: ruff check python
2731
- name: Run make check
2832
run: make check
2933
- name: Run make distcheck

python/subunit/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ def addUnexpectedSuccess(self, test, details=None):
762762

763763
def _test_id(self, test):
764764
result = test.id()
765-
if type(result) is not bytes:
765+
if not isinstance(result, bytes):
766766
result = result.encode('utf8')
767767
return result
768768

0 commit comments

Comments
 (0)