Skip to content
This repository was archived by the owner on Oct 13, 2024. It is now read-only.

Commit 8314c45

Browse files
chore: update global workflows (#6315)
1 parent 38d3d6a commit 8314c45

File tree

2 files changed

+29
-6
lines changed

2 files changed

+29
-6
lines changed

.flake8

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[flake8]
22
filename =
3-
*.py,
4-
*.pys
3+
*.py
54
max-line-length = 120
65
extend-exclude =
76
venv/

.github/workflows/python-flake8.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,37 @@ jobs:
2626
- name: Set up Python
2727
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
2828
with:
29-
python-version: '3.10'
29+
python-version: '3.12'
3030

3131
- name: Install dependencies
3232
run: |
33-
# pin flake8 before v6.0.0 due to removal of support for type comments (required for Python 2.7 type hints)
34-
python -m pip install --upgrade pip setuptools "flake8<6"
33+
python -m pip install --upgrade \
34+
pip \
35+
setuptools \
36+
wheel \
37+
flake8 \
38+
nb-clean \
39+
nbqa[toolchain]
3540
3641
- name: Test with flake8
3742
run: |
38-
python -m flake8 --verbose
43+
python -m flake8 \
44+
--color=always \
45+
--verbose
46+
47+
- name: Test with nbqa
48+
run: |
49+
python -m nbqa flake8 \
50+
--color=always \
51+
--verbose \
52+
.
53+
54+
- name: Test with nb-clean
55+
run: |
56+
output=$(find . -name '*.ipynb' -exec nb-clean check {} \;)
57+
58+
# fail if there are any issues
59+
if [ -n "$output" ]; then
60+
echo "$output"
61+
exit 1
62+
fi

0 commit comments

Comments
 (0)