mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-13061 Getter signature should be self: false positive for properties with other decorators
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user