From e15f7a1f02e2a47ce70c82109b18ed4665a4dc3b Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sat, 12 Dec 2020 18:54:41 +0900 Subject: [PATCH] refactor: pretty change for isproperty() It is more readable to use `>=` to compare versions. --- sphinx/util/inspect.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/util/inspect.py b/sphinx/util/inspect.py index c730fefdb..df469a5ae 100644 --- a/sphinx/util/inspect.py +++ b/sphinx/util/inspect.py @@ -355,7 +355,7 @@ def iscoroutinefunction(obj: Any) -> bool: def isproperty(obj: Any) -> bool: """Check if the object is property.""" - if sys.version_info > (3, 8): + if sys.version_info >= (3, 8): from functools import cached_property # cached_property is available since py3.8 if isinstance(obj, cached_property): return True