Skip to content

Commit 63c02e2

Browse files
Apply suggested change to stubgenc
isbuiltin is isinstance(object, types.BuiltinFunctionType), and type(ord) is BuiltinFunctionType, so these conditions are the same Co-authored-by: Jelle Zijlstra <[email protected]>
1 parent f619cfd commit 63c02e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/stubgenc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def get_type_annotation(self, obj: object) -> str:
471471

472472
def is_function(self, obj: object) -> bool:
473473
if self.is_c_module:
474-
return inspect.isbuiltin(obj) or type(obj) is type(ord)
474+
return inspect.isbuiltin(obj)
475475
else:
476476
return inspect.isfunction(obj)
477477

0 commit comments

Comments
 (0)