mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add types and docstring to function _method_is_bound()
.
This commit is contained in:
parent
e8aae67c8a
commit
249ff9323c
@ -129,7 +129,8 @@ class MockFinder(MetaPathFinder):
|
||||
sys.modules.pop(modname, None)
|
||||
|
||||
|
||||
def _method_is_bound(method):
|
||||
def _method_is_bound(method: MethodType) -> bool:
|
||||
"""Check if the method is a bound method."""
|
||||
try:
|
||||
return method.__self__ is not None
|
||||
except AttributeError:
|
||||
|
Loading…
Reference in New Issue
Block a user