You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This line throws an NameError on every file found in the line above so the expected os.remove() never happens. The loop is placing filepaths into the variable c but the os.remove() is attempting to delete filepath f which is an undefined name which raises NameError which is swept under the rug by the bare exception. PEP8 and other sources are quite articulate why bare exceptions should be avoided and this is a classic example.
This line throws an NameError on every file found in the line above so the expected os.remove() never happens. The loop is placing filepaths into the variable c but the os.remove() is attempting to delete filepath f which is an undefined name which raises NameError which is swept under the rug by the bare exception. PEP8 and other sources are quite articulate why bare exceptions should be avoided and this is a classic example.
flake8 testing of https://github.com/CSAILVision/NetDissect-Lite on Python 3.7.1
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
The text was updated successfully, but these errors were encountered: