Skip to content

Commit

Permalink
Add flake8 format checking
Browse files Browse the repository at this point in the history
  • Loading branch information
TunaLobster authored and peterbarker committed Jun 23, 2022
1 parent eb68c47 commit 7f53bf1
Show file tree
Hide file tree
Showing 8 changed files with 234 additions and 225 deletions.
20 changes: 20 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[flake8]
ignore =
# H301: one import per line
H301,
# H306: imports not in alphabetical order (time, os)
H306,
# E226: missing whitespace around arithmetic operator
E226,
# E261 at least two spaces before inline comment
E261,
# W504 line break after binary operator
W504,
# E203 whitespace before ':'
E203,
# E221 multiple spaces before operator
E221

max-line-length = 127

exclude = .git,__pycache__,conf.py,old,build,dist
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ jobs:
- name: Check image formats
run: |
find ./images/ -exec file {} + | grep RIFF -vzq
- name: Check python flake8 formating
run : |
set -eux -o pipefail
flake8 .
- name: Test build
run: |
./update.py --parallel 4 --verbose --destdir=/tmp/web
3 changes: 3 additions & 0 deletions Sphinxsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ python3 -m pip install --user --upgrade git+https://github.com/ArduPilot/sphinxc
# and a parser to use getting posts from Discourse (forum) and insert in FrontEnd
python3 -m pip install --user --upgrade beautifulsoup4

# Install flake8
python3 -m pip install --user --upgrade flake8==3.7.9

# Reset the value of DISPLAY
if grep -qi -E '(Microsoft|WSL)' /proc/version; then
echo "Returning DISPLAY to the previous value in WSL"
Expand Down
Loading

0 comments on commit 7f53bf1

Please sign in to comment.