Upgrade linters to use Python 3.11

This commit is contained in:
Orsiris de Jong 2023-02-01 01:53:29 +01:00
parent 7829008886
commit 1b38ad6d67
2 changed files with 8 additions and 8 deletions

View file

@ -10,7 +10,7 @@ jobs:
matrix:
os: [ubuntu-latest]
# python-version: [3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, "3.10", 'pypy-3.6', 'pypy-3.7']
python-version: [3.9]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
@ -24,14 +24,14 @@ jobs:
python -m pip install --upgrade setuptools
if [ -f npbackup/requirements.txt ]; then pip install -r npbackup/requirements.txt; fi
- name: Lint with Pylint
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install pylint
# Do not run pylint on python 3.3 because isort is not available for python 3.3, don't run on python 3.4 because pylint: disable=xxxx does not exist
# Disable E0401 import error since we lint on linux and pywin32 is obviously missing
python -m pylint --disable=C,W,R --max-line-length=127 npbackup
- name: Lint with flake8
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
@ -40,7 +40,7 @@ jobs:
python -m flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics npbackup
- name: Lint with Black
# Don't run on python < 3.6 since black does not exist there, run only once
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
pip install black
python -m black --check npbackup

View file

@ -11,7 +11,7 @@ jobs:
os: [windows-latest]
# Don't use pypy on windows since it does not have pywin32 module
# python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.9]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
@ -25,13 +25,13 @@ jobs:
python -m pip install --upgrade setuptools
if (Test-Path "npbackup/requirements.txt") { pip install -r npbackup/requirements.txt }
- name: Lint with Pylint
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install pylint
# Do not run pylint on python 3.3 because isort is not available for python 3.3, don't run on python 3.4 because pylint: disable=xxxx does not exist
python -m pylint --disable=C,W,R --max-line-length=127 npbackup
- name: Lint with flake8
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
python -m pip install flake8
# stop the build if there are Python syntax errors or undefined names
@ -40,7 +40,7 @@ jobs:
python -m flake8 --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics npbackup
- name: Lint with Black
# Don't run on python < 3.6 since black does not exist there, run only once
if: ${{ matrix.python-version == '3.9' }}
if: ${{ matrix.python-version == '3.11' }}
run: |
pip install black
python -m black --check npbackup