Skip to content

Commit 4e4a1fe

Browse files
committed
flake8 -> ruff, ci updates
1 parent 3c5ac25 commit 4e4a1fe

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

.github/workflows/run-tests.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
python-version: [3.9.12, 3.10.6, 3.11.0, 3.12.0, 3.13.0]
13-
os: [ubuntu-18.04, macOS-latest]
12+
python-version: [3.11.0, 3.12.0, 3.13.0]
13+
os: [ubuntu-24.04, macos-latest]
1414

1515
steps:
16-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v4
1717

1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v5
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222

@@ -30,11 +30,10 @@ jobs:
3030
- name: yapf
3131
run: yapf --diff coldcore
3232

33-
- name: flake8
33+
- name: ruff
3434
run: |
35-
flake8 coldcore --count --show-source --statistics
36-
# When linting the tests, ignore long line errors
37-
flake8 test/ --count --show-source --statistics --extend-ignore E501
35+
ruff check coldcore
36+
ruff check test
3837
3938
- name: pytest
4039
run: |

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ test: docker-build
99
-v $$(pwd):/src:ro coldcore/test pytest -vv --color=yes test/
1010

1111
lint: docker-build
12-
docker run --rm -v $$(pwd):/src:ro coldcore/test flake8 coldcore
12+
docker run --rm -v $$(pwd):/src:ro coldcore/test ruff coldcore
1313
docker run --rm -v $$(pwd):/src:ro coldcore/test yapf --diff coldcore
1414
docker run --rm -v $$(pwd):/src:ro coldcore/test mypy coldcore
1515

coldcore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class Arg:
155155
if kwargs.get("type") == inspect.Parameter.empty:
156156
kwargs.pop("type")
157157

158-
if self.type == bool or any(self.default is i for i in [True, False]):
158+
if self.type is bool or any(self.default is i for i in [True, False]):
159159
kwargs["action"] = "store_false" if self.default else "store_true"
160160
kwargs.pop("type", "")
161161

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
mypy==0.942
22
pytest==7.1.1
3-
flake8==4.0.1
3+
ruff==0.9.4
44
yapf==0.43.0

0 commit comments

Comments
 (0)