mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge branch 'boolDefault' of github.com:yoff/codeql into boolDefault
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user