diff options
Diffstat (limited to 'sphinx/util/inspect.py')
| -rw-r--r-- | sphinx/util/inspect.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py index 5ba05f04b..caf333493 100644 --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -222,6 +222,12 @@ def iscoroutinefunction(obj): return False +def isproperty(obj): + # type: (Any) -> bool + """Check if the object is property.""" + return isinstance(obj, property) + + def safe_getattr(obj, name, *defargs): # type: (Any, str, str) -> object """A getattr() that turns all exceptions into AttributeErrors.""" |
