Skip to content

Commit

Permalink
Employ flake8-import-order to ensure correct import orders accordin…
Browse files Browse the repository at this point in the history
…g to PEP8
  • Loading branch information
themylogin committed Mar 14, 2022
1 parent 282cb21 commit 8091d14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install flake8 flake8-import-order
- name: Get current errors
run: |
tmpafter=$(mktemp)
find src -name \*.py -exec flake8 --ignore=E402,E501,W504 {} + | egrep -v "alembic/versions/|usr/local/share/pysnmp/mibs/" > $tmpafter
find src -name \*.py -exec flake8 --application-import-names middlewared --ignore=E402,E501,W504 {} + | egrep -v "alembic/versions/|usr/local/share/pysnmp/mibs/" > $tmpafter
num_errors_after=`cat $tmpafter | wc -l`
echo "CURRENT_ERROR_FILE=${tmpafter}" >> $GITHUB_ENV
echo "CURRENT_ERRORS=${num_errors_after}" >> $GITHUB_ENV
Expand All @@ -35,7 +35,7 @@ jobs:
- name: Get errors from base branch
run: |
tmpbefore=$(mktemp)
find src -name \*.py -exec flake8 --ignore=E402,E501,W504 {} + | egrep -v "alembic/versions/|usr/local/share/pysnmp/mibs/" > $tmpbefore
find src -name \*.py -exec flake8 --application-import-names middlewared --ignore=E402,E501,W504 {} + | egrep -v "alembic/versions/|usr/local/share/pysnmp/mibs/" > $tmpbefore
num_errors_before=`cat $tmpbefore | wc -l`
echo "OLD_ERROR_FILE=${tmpbefore}" >> $GITHUB_ENV
echo "OLD_ERRORS=${num_errors_before}" >> $GITHUB_ENV
Expand Down

0 comments on commit 8091d14

Please sign in to comment.