Files
ruff/resources/test/fixtures/B004.py
Harutaka Kawamura 7773e9728b Implement B004 (#638)
2022-11-07 09:25:09 -05:00

13 lines
299 B
Python

def this_is_a_bug():
o = object()
if hasattr(o, "__call__"):
print("Ooh, callable! Or is it?")
if getattr(o, "__call__", False):
print("Ooh, callable! Or is it?")
def this_is_fine():
o = object()
if callable(o):
print("Ooh, this is actually callable.")