ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
11.02k stars 17.57k forks source link

Undefined name 'autotest' in ./Tools/autotest/sim_vehicle.py #10279

Closed cclauss closed 5 years ago

cclauss commented 5 years ago

Discovered via #10278

Bug report

flake8 testing of https://github.com/ArduPilot/ardupilot on Python 3.7.1

$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics

./Tools/autotest/sim_vehicle.py:396:39: F821 undefined name 'autotest'
    swarminit_filepath = os.path.join(autotest, "swarminit.txt")
                                      ^
1     F821 undefined name 'autotest'
1

E901,E999,F821,F822,F823 are the "showstopper" flake8 issues that can halt the runtime with a SyntaxError, NameError, etc. Most other flake8 issues are merely "style violations" -- useful for readability but they do not effect runtime safety.

Issue details

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

peterbarker commented 5 years ago

Pushed a fix in for this.

sim_vehicle.py is compliant with flake8 sim_vehicle.py now - should we tighten things up in any way, or just make sure we run things in CI?

cclauss commented 5 years ago

Nice fix! Thanks! #10278 finds issues in /modules including UAVCAN/pyuavcan#51 that was just fixed as well. I think for this repo the CI test is good enough for now.