Closed cclauss closed 5 years ago
Error() is an undefined name in this context so this PR recommends using Exception() in its place.
flake8 testing of https://github.com/google/mobly on Python 3.7.1
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./mobly/records.py:233:32: F821 undefined name 'unicode' self.details = unicode(content) ^ ./mobly/controllers/monsoon.py:58:15: F821 undefined name 'Error' raise Error('No valid config found in: %s' % configs) ^ ./mobly/controllers/monsoon.py:529:23: F821 undefined name 'voltage' voltage = int(voltage[:-1]) ^ ./mobly/controllers/monsoon.py:693:34: F821 undefined name 'mon' self.mon.RampVoltage(mon.start_voltage, volt) ^ ./tests/mobly/controllers/android_device_test.py:632:13: F821 undefined name 'assertIs' assertIs(e, expected_e) ^ 5 F821 undefined name 'Error' 5
This change is
Error() is an undefined name in this context so this PR recommends using Exception() in its place.
flake8 testing of https://github.com/google/mobly on Python 3.7.1
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
This change is