Skip to content

Merge pull request #6178 from fchapoton/des_typos #499

Merge pull request #6178 from fchapoton/des_typos

Merge pull request #6178 from fchapoton/des_typos #499

Workflow file for this run

name: Format python code
on:
push:
branches: [ 'main' ]
jobs:
autopep8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
id: checkout
- name: autopep8
uses: peter-evans/autopep8@v1
if: ${{ github.repository }} == 'LMFDB/lmfdb'
with:
# see generate_autopep8codes.py
# E241 - Fix extraneous whitespace around keywords.
# E242 - Remove extraneous whitespace around operator.
# E251 - Remove whitespace around parameter '=' sign.
# E252 - Missing whitespace around parameter equals.
# E27 - Fix extraneous whitespace around keywords.
# E266 - Fix too many leading '#' for block comments.
# W291 - Remove trailing whitespace.
# W292 - Add a single newline at the end of the file.
# W293 - Remove trailing whitespace on blank line.
# E303 - Remove extra blank lines.
# E304 - Remove blank line following function decorator.
# E306 - Expected 1 blank line before a nested definition.
# W391 - Remove trailing blank lines.
# E401 - Put imports on separate lines.
# E502 - Remove extraneous escape of newline.
# W504 - Fix line break after binary operator.
# W601 - Use "in" rather than "has_key()".
# W602 - Fix deprecated form of raising exception.
# W603 - Use "!=" instead of "<>"
# W604 - Use "repr()" instead of backticks.
# W605 - Fix invalid escape sequence 'x'.
# W690 - Fix various deprecated code (via lib2to3).
# E70 - Put semicolon-separated compound statement on separate lines.
# E701 - Put colon-separated compound statement on separate lines.
# E711 - Fix comparison with None.
# E712 - Fix comparison with boolean.
# E713 - Use 'not in' for test for membership.
# E714 - Use 'is not' test for object identity.
# E721 - Use "isinstance()" instead of comparing types directly.
# E722 - Fix bare except.
# E731 - Use a def when use do not assign a lambda expression.
args: --recursive --in-place --aggressive --select=E241,E242,E251,E252,E266,E27,W291,W292,W293,E303,E304,E306,W391,E401,E502,W504,W601,W602,W603,W604,W605,W690,E70,E701,E711,E712,E713,E714,E721,E722,E731 lmfdb/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: autopep8 action fixes
title: Fixes by autopep8 action
body: This is an auto-generated PR with fixes by autopep8.
labels: autopep8, automated pr
branch: autopep8-patches
# branch-suffix: timestamp
delete-branch: true