From f718d3d66bafc95bcccdd16403dc0b945c685286 Mon Sep 17 00:00:00 2001 From: eirannejad Date: Wed, 7 Feb 2024 15:43:07 -0600 Subject: [PATCH] fixed tests --- jedi/parser_utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jedi/parser_utils.py b/jedi/parser_utils.py index 6a8141b9..7dc0b37e 100644 --- a/jedi/parser_utils.py +++ b/jedi/parser_utils.py @@ -339,5 +339,10 @@ def _function_is_x_method(decorator_checker): function_is_staticmethod = _function_is_x_method(lambda m: m == "staticmethod") function_is_classmethod = _function_is_x_method(lambda m: m == "classmethod") function_is_property = _function_is_x_method( - lambda m: m == "property" or m == "cached_property" or m.endswith(".setter") + lambda m: m == "property" \ + or m == "cached_property" \ + # do not report __class__.__setter__ as a property + # eirannejad 2024-02-07: + # not sure if there are other cases but this passes the tests + or (m.endswith(".setter") and not m.startswith('__class__')) )