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
Finding except clauses that raise a different exception class than they catch:
$ astpath "//ExceptHandler[body//Raise/exc//Name and not(contains(body//Raise/exc//Name/@id, type/Name/@id))]" | head -5
./hashlib.py:144 >except ImportError:
./plistlib.py:89 > except KeyError:
./plistlib.py:103 > except KeyError:
./nntplib.py:868 > except ValueError:
./argparse.py:1116 > except KeyError:
Rule request
Thesis
We need to disallow code like this:
This is just a
goto
statement.Related:
From: https://github.com/hchasestevens/astpath
Reasoning
We do not need a
goto
in our code.The text was updated successfully, but these errors were encountered: