From 5d2bdd45b138dd3ccc806ab0873f24dc3d73593e Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Wed, 15 Oct 2014 20:04:39 +0400 Subject: [PATCH] PY-13061 Getter signature should be self: false positive for properties with other decorators --- python/helpers/pycharm_generator_utils/util_methods.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/python/helpers/pycharm_generator_utils/util_methods.py b/python/helpers/pycharm_generator_utils/util_methods.py index 273b0a20b715..a7e0877ad017 100644 --- a/python/helpers/pycharm_generator_utils/util_methods.py +++ b/python/helpers/pycharm_generator_utils/util_methods.py @@ -586,7 +586,7 @@ def restore_clr(p_name, p_class): if p_name == '__new__': methods = [c for c in clr_type.GetConstructors()] if not methods: - return False, p_name + '(*args)', 'cannot find CLR constructor' + return False, p_name + '(self, *args)', 'cannot find CLR constructor' # "self" is always first argument of any non-static method else: methods = [m for m in clr_type.GetMethods() if m.Name == p_name] if not methods: @@ -594,7 +594,8 @@ def restore_clr(p_name, p_class): if len(bases) == 1 and p_name in dir(bases[0]): # skip inherited methods return False, None, None - return False, p_name + '(*args)', 'cannot find CLR method' + return False, p_name + '(self, *args)', 'cannot find CLR method' + # "self" is always first argument of any non-static method parameter_lists = [] for m in methods: