mirror of https://github.com/kivy/pyjnius.git
Avoid replacing existing fields with getter methods
from @dschiller & @jianbing https://github.com/kivy/pyjnius/issues/405
This commit is contained in:
parent
e685086aba
commit
b2632cd0bc
|
@ -239,8 +239,9 @@ def autoclass(clsname):
|
|||
classDict[name] = (JavaStaticMethod if static else JavaMethod)(sig, varargs=varargs)
|
||||
if name != 'getClass' and bean_getter(name) and len(method.getParameterTypes()) == 0:
|
||||
lowername = lower_name(name[2 if name.startswith('is') else 3:])
|
||||
classDict[lowername] = (lambda n: property(lambda self: getattr(self, n)()))(name)
|
||||
continue
|
||||
if lowername not in methods_name:
|
||||
classDict[lowername] = (lambda n: property(lambda self: getattr(self, n)()))(name)
|
||||
continue
|
||||
|
||||
# multiple signatures
|
||||
signatures = []
|
||||
|
|
Loading…
Reference in New Issue