Skip to content

Commit 3ffb3cb

Browse files
committed
Adjusted lint_python workflow
Upgraded flake8 to 7.1
1 parent 41c9cb2 commit 3ffb3cb

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

.github/workflows/lint_python.yml

+20-3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,23 @@ jobs:
88
- uses: actions/setup-python@v4
99
with:
1010
python-version: 3.12
11-
- shell: bash
12-
name: Lint and test
13-
run: ./lint.sh
11+
- name: Install dependencies
12+
run: |
13+
python -m pip install --upgrade pip
14+
pip install -r requirements-dev.txt
15+
- name: Lint with flake8
16+
run: flake8 ./patterns --count --show-source --statistics
17+
- name: Format check with isort and black
18+
run: |
19+
isort --profile black --check ./patterns
20+
black --check ./patterns
21+
- name: Type check with mypy
22+
run: mypy --ignore-missing-imports ./patterns || true
23+
- name: Run tests with pytest
24+
run: |
25+
pytest ./patterns
26+
pytest --doctest-modules ./patterns || true
27+
- name: Check Python version compatibility
28+
run: shopt -s globstar && pyupgrade --py312-plus ./patterns/**/*.py
29+
- name: Run tox
30+
run: tox

requirements-dev.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
-e .
2-
1+
mypy
2+
pyupgrade
33
pytest>=6.2.0
44
pytest-cov>=2.11.0
55
pytest-randomly>=3.1.0
66
black>=25.1.0
77
isort>=5.7.0
8-
flake8>=7.2.0
8+
flake8>=7.1.0
99
tox>=4.25.0

0 commit comments

Comments
 (0)