chore: update global workflows (#3107)
This commit is contained in:
3
.flake8
3
.flake8
@@ -1,7 +1,6 @@
|
|||||||
[flake8]
|
[flake8]
|
||||||
filename =
|
filename =
|
||||||
*.py,
|
*.py
|
||||||
*.pys
|
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
extend-exclude =
|
extend-exclude =
|
||||||
venv/
|
venv/
|
||||||
|
|||||||
32
.github/workflows/python-flake8.yml
vendored
32
.github/workflows/python-flake8.yml
vendored
@@ -26,13 +26,37 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
|
uses: actions/setup-python@v5 # https://github.com/actions/setup-python
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
python-version: '3.12'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
# pin flake8 before v6.0.0 due to removal of support for type comments (required for Python 2.7 type hints)
|
python -m pip install --upgrade \
|
||||||
python -m pip install --upgrade pip setuptools "flake8<6"
|
pip \
|
||||||
|
setuptools \
|
||||||
|
wheel \
|
||||||
|
flake8 \
|
||||||
|
nb-clean \
|
||||||
|
nbqa[toolchain]
|
||||||
|
|
||||||
- name: Test with flake8
|
- name: Test with flake8
|
||||||
run: |
|
run: |
|
||||||
python -m flake8 --verbose
|
python -m flake8 \
|
||||||
|
--color=always \
|
||||||
|
--verbose
|
||||||
|
|
||||||
|
- name: Test with nbqa
|
||||||
|
run: |
|
||||||
|
python -m nbqa flake8 \
|
||||||
|
--color=always \
|
||||||
|
--verbose \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Test with nb-clean
|
||||||
|
run: |
|
||||||
|
output=$(find . -name '*.ipynb' -exec nb-clean check {} \;)
|
||||||
|
|
||||||
|
# fail if there are any issues
|
||||||
|
if [ -n "$output" ]; then
|
||||||
|
echo "$output"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user