summaryrefslogtreecommitdiff
path: root/sphinx/util/inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/util/inspect.py')
-rw-r--r--sphinx/util/inspect.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py
index 763e39cc2..06920288f 100644
--- a/sphinx/util/inspect.py
+++ b/sphinx/util/inspect.py
@@ -301,7 +301,7 @@ def isstaticmethod(obj: Any, cls: Any = None, name: str = None) -> bool:
def isdescriptor(x: Any) -> bool:
"""Check if the object is some kind of descriptor."""
for item in '__get__', '__set__', '__delete__':
- if hasattr(safe_getattr(x, item, None), '__call__'):
+ if callable(safe_getattr(x, item, None)):
return True
return False