@@ -27,32 +27,32 @@ class ImpExp:
27
27
def __init__ (self ):
28
28
pass
29
29
30
- def _dump (self , cls , item , exclude_attribute : Optional [list ] = None ):
30
+ def _dump (self , cls , item , exclude_attributes : Optional [List [ str ]] = None ) -> dict :
31
31
if cls in [None , "" , [], {}]:
32
32
val = item
33
33
elif isinstance (item , Message ):
34
34
val = {qualified_name (item .__class__ ): item .to_dict ()}
35
35
elif cls == object :
36
36
val = qualified_name (item )
37
37
elif isinstance (cls , list ):
38
- val = [self ._dump (cls [0 ], v , exclude_attribute ) for v in item ]
38
+ val = [self ._dump (cls [0 ], v , exclude_attributes ) for v in item ]
39
39
else :
40
- val = item .dump (exclude_attribute = exclude_attribute )
40
+ val = item .dump (exclude_attributes = exclude_attributes )
41
41
42
42
return val
43
43
44
- def dump (self , exclude_attribute : Optional [List [str ]] = None ) -> dict :
45
- _exclude_attribute = exclude_attribute or []
44
+ def dump (self , exclude_attributes : Optional [List [str ]] = None ) -> dict :
45
+ _exclude_attributes = exclude_attributes or []
46
46
info = {}
47
47
for attr , cls in self .parameter .items ():
48
- if attr in _exclude_attribute :
48
+ if attr in _exclude_attributes :
49
49
continue
50
50
51
51
item = getattr (self , attr , None )
52
52
if item is None :
53
53
continue
54
54
55
- info [attr ] = self ._dump (cls , item , exclude_attribute )
55
+ info [attr ] = self ._dump (cls , item , exclude_attributes )
56
56
57
57
return info
58
58
0 commit comments