Skip to content

Commit

Permalink
Add separate pyupgrade workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola committed Aug 28, 2022
1 parent 88590c6 commit 0b09609
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/pyupgrade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: pyupgrade

on: push # yamllint disable-line rule:truthy

jobs:
pyupgrade:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- run: pip install pyupgrade
- name: Ensure modern Python style using pyupgrade
# This script is written in a Linux / macos / windows portable way
run: |
python -c "
import sys
from pyupgrade._main import main
from glob import glob
files = glob('**/*.py', recursive=True)
sys.exit(main(files + ['--py37-plus']))
"

0 comments on commit 0b09609

Please sign in to comment.