Merge branch 'boolDefault' of github.com:yoff/codeql into boolDefault

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-05-14 16:06:58 +02:00

View File

@@ -117,9 +117,11 @@ class OK(object):
yield 0
raise StopIteration
# __bool__ returns `True` by default, so raising `TypeError` should not give an alert
# FP reported in https://github.com/github/codeql/issues/2388
def __bool__(self):
raise TypeError
class BadBool(object):
def __bool__(self):
raise ZeroDivisionError()
raise ZeroDivisionError()