mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Make a few __get__ methods work properly on their class
Automatic doc generation requires this.
This commit is contained in:
parent
d3fa2891c8
commit
50b08d94d9
1 changed files with 4 additions and 0 deletions
|
@ -121,6 +121,8 @@ class MoveEffectProperty(object):
|
|||
self.effect_column = effect_column
|
||||
|
||||
def __get__(self, obj, cls):
|
||||
if obj is None:
|
||||
return self
|
||||
if obj.move_effect is None:
|
||||
return None
|
||||
prop = getattr(obj.move_effect, self.effect_column)
|
||||
|
@ -131,6 +133,8 @@ class MoveEffectPropertyMap(MoveEffectProperty):
|
|||
proxies.
|
||||
"""
|
||||
def __get__(self, obj, cls):
|
||||
if obj is None:
|
||||
return self
|
||||
prop = getattr(obj.move_effect, self.effect_column)
|
||||
newdict = dict(prop)
|
||||
for key in newdict:
|
||||
|
|
Loading…
Reference in a new issue