hours, mins, secs are undefined names in this context which has the potential to cause _NameError to be raised at runtime. They are defined in other functions/methods in the same file.
./Tools/ardupilotwaf/boards.py:252:13: F821 undefined name 'bld'
bld.fatal("Failed to created ap_romfs_embedded.h")
^
./Tools/autotest/arducopter.py:1511:30: F821 undefined name 'hours'
st.param2 == hours and
^
./Tools/autotest/arducopter.py:1512:30: F821 undefined name 'mins'
st.param3 == mins and
^
./Tools/autotest/arducopter.py:1513:30: F821 undefined name 'secs'
st.param4 == secs):
^
./Tools/autotest/arduplane.py:323:27: F821 undefined name 'AutoTestTimeoutException'
raise AutoTestTimeoutException("Manuevers not completed")
^
5 F821 undefined name 'bld'
5
Please describe the problem
VersionWhat version was the issue encountered with
Bug report
Issue details https://github.com/ArduPilot/ardupilot/blob/master/Tools/autotest/arducopter.py#L1377-L1379
hours, mins, secs are undefined names in this context which has the potential to cause _NameError to be raised at runtime. They are defined in other functions/methods in the same file.
flake8 testing of https://github.com/ArduPilot/ardupilot on Python 3.7.1
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
Please describe the problem
Version What version was the issue encountered with
Platform [ ] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover [ ] Submarine
Airframe type What type of airframe (flying wing, glider, hex, Y6, octa etc)
Hardware type What autopilot hardware was used? (Pixhawk, Cube, Pixracer, Navio2, etc)
Logs Please provide a link to any relevant logs that show the issue