Skip to content

Commit

Permalink
Move pyupgrade check to main workflow
Browse files Browse the repository at this point in the history
Add `pyupgrade` to test dependencies.
  • Loading branch information
akaihola committed Feb 25, 2022
1 parent c7508d3 commit 580e612
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install --upgrade pip wheel
- run: pip install
pyupgrade safety
- run: pip install safety
- run: pip install --editable .
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py
- run: safety check
11 changes: 11 additions & 0 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,14 @@ jobs:
run: bandit --recursive --skip B101 ./src/darker/tests
- name: Check English spelling in the code base using codespell
run: codespell
- name: Ensure modern Python style using pyupgrade
# This script is written in a Linux / macos / windows portable way
run: |
python -c "
from pyupgrade._main import main
from glob import glob
files = glob('**/*.py', recursive=True)
main(files + ['--py36-plus'])
"
- name: Check dependencies for known security vulterabilities using Safety
run: safety check
1 change: 1 addition & 0 deletions constraints-oldest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pytest==6.1.0
pytest-flake8==1.0.6
pytest-isort==1.1.0
pytest-kwparametrize==0.0.3
pyupgrade==2.31.0
regex==2021.4.4
toml==0.10.0
types-toml==0.10.4
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@ test =
flake8-bugbear>=22.1.11
flake8-comprehensions>=3.7.0
mypy>=0.931
pygments
pylint
pytest>=6.1.0
pytest-darker
pytest-flake8>=1.0.6
pytest-isort>=1.1.0
pytest-kwparametrize>=0.0.3
pytest-mypy
pygments
pyupgrade>=2.31.0
regex>=2021.4.4
types-dataclasses ; python_version < "3.7"
types-toml>=0.10.4
Expand Down

0 comments on commit 580e612

Please sign in to comment.