-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
C: undefined-variableIssues related to 'undefined-variable' checkIssues related to 'undefined-variable' checkControl flowRequires control flow understandingRequires control flow understandingFalse Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Description
Originally reported by: BitBucket: moxian, GitHub: @moxian?
Pylint'ing snippet
def main():
exc = None
try:
[][1] = 12
except IndexError as exc:
pass
if exc is not None:
raise exc
main()
says
Raising NoneType while only classes, instances or string are allowed (raising-bad-type)
when in fact None will never be attempted to be raised
Python 2
gavrilovp
Metadata
Metadata
Assignees
Labels
C: undefined-variableIssues related to 'undefined-variable' checkIssues related to 'undefined-variable' checkControl flowRequires control flow understandingRequires control flow understandingFalse Negative 🦋No message is emitted but something is wrong with the codeNo message is emitted but something is wrong with the codeNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation