Skip to content

Commit 4e2dda7

Browse files
cclausstridge
authored andcommitted
Add # flake8: noqa directive to all failing files
Run flake8 in GitHub Actions but exclude third-party libraries `run: pipx run flake8 --exclude=MAVProxy/modules/lib` Once this has been running for a while, we can: - delete the remaining lines in the GitHub Action - delete `scripts/run_flake8.py` - remove all instances of AP_FLAKE8_CLEAN (`git grep AP_FLAKE8_CLEAN`) ArduPilot/ardupilot#30288 (comment) % `flake8 --exclude=MAVProxy/modules/lib --disable-noqa --count` ``` [ ... ] 5737 ```
1 parent dbfe12f commit 4e2dda7

File tree

120 files changed

+249
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+249
-7
lines changed

.github/workflows/python-cleanliness.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ jobs:
1616
with:
1717
submodules: 'recursive'
1818

19+
# Run flake8 but exclude third-party libraries
20+
- run: pipx run flake8 --exclude=MAVProxy/modules/mavproxy_cesium,MAVProxy/modules/lib
21+
# Once this has been running for a while, we can:
22+
# - delete the lines below
23+
# - delete scripts/run_flake8.py
24+
# - remove all instances of AP_FLAKE8_CLEAN (git grep AP_FLAKE8_CLEAN)
25+
1926
- name: Install dependencies
20-
run: |
21-
python -m pip install -U flake8
27+
run: python -m pip install --upgrade flake8
2228

2329
- name: Check Python with Flake8
24-
run: |
25-
scripts/run_flake8.py MAVProxy
30+
run: scripts/run_flake8.py MAVProxy

MAVProxy/modules/mavproxy_DGPS.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
support for a GCS attached DGPS system
44
'''
55

6+
# flake8: noqa
7+
68
import socket, errno
79
from pymavlink import mavutil
810
from MAVProxy.modules.lib import mp_module

MAVProxy/modules/mavproxy_GPSInject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
primarily used to inject uBlox AssistNow data
44
"""
55

6+
# flake8: noqa
7+
68
import random
79
import time
810
import os

MAVProxy/modules/mavproxy_GPSInput.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
support for GPS_INPUT message
44
'''
55

6+
# flake8: noqa
7+
68
import socket, errno
79
import json
810
from pymavlink import mavutil

MAVProxy/modules/mavproxy_HIL.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
This interfaces to Tools/autotest/jsbsim/runsim.py to run the JSBSim flight simulator
88
'''
99

10+
# flake8: noqa
11+
1012
import sys, os, time, socket, errno, struct, math
1113
from math import degrees, radians
1214
from MAVProxy.modules.lib import mp_module

MAVProxy/modules/mavproxy_OpenDroneID.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Support for OpenDroneID
33
'''
44

5+
# flake8: noqa
6+
57
from MAVProxy.modules.lib import mp_module
68
from MAVProxy.modules.lib import mp_settings
79
from pymavlink import mavutil

MAVProxy/modules/mavproxy_SIYI/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
circle hottest area?
88
'''
99

10+
# flake8: noqa
11+
1012
from MAVProxy.modules.lib import mp_module
1113
from MAVProxy.modules.lib import mp_settings
1214
from MAVProxy.modules.lib.mp_settings import MPSetting

MAVProxy/modules/mavproxy_SIYI/camera_view.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
22

3+
# flake8: noqa
4+
35
from threading import Thread
46
import cv2
57

MAVProxy/modules/mavproxy_SIYI/raw_thermal.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/env python3
22

3+
# flake8: noqa
4+
35
from threading import Thread
46
import cv2
57
import os

MAVProxy/modules/mavproxy_SIYI/tools/playback.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
playback videos with temperature data
44
'''
55

6+
# flake8: noqa
7+
68
from MAVProxy.modules.lib.mp_image import MPImage
79
from MAVProxy.modules.lib.mp_image import MPImageFrameCounter
810
from MAVProxy.modules.lib.mp_image import MPImageOSD_HorizonLine

0 commit comments

Comments
 (0)