Skip to content

Commit 18aa948

Browse files
committed
Fix issue295
1 parent 18a0a8f commit 18aa948

File tree

2 files changed

+52
-6
lines changed

2 files changed

+52
-6
lines changed

fire/helptext.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,12 +124,12 @@ def ReturnAllArgs(Inherit_classes_list):
124124
Return: list of all arguments which is retrieved from parent classes.
125125
"""
126126
all_args = []
127-
if len(Inherit_classes_list)>2:
128-
for classes in Inherit_classes_list:
129-
argspec_tuple=inspect.getargspec(classes)
130-
args_list=argspec_tuple[0]
131-
for arg in args_list[1:]:
132-
all_args.append(arg)
127+
128+
for classes in Inherit_classes_list:
129+
argspec_tuple=inspect.getargspec(classes)
130+
args_list=argspec_tuple[0]
131+
for arg in args_list[1:]:
132+
all_args.append(arg)
133133

134134
return all_args
135135

go.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import fire
2+
3+
class D:
4+
def __init__(self,cool,**kw):
5+
for e in kw:
6+
print(e,cool)
7+
self.cool=cool
8+
def shit(self,sh,jp):
9+
print(sh,jp)
10+
def oye(self,oy):
11+
print(oy)
12+
def job(self,low):
13+
print(low)
14+
class A(D):
15+
16+
def __init__(self, name,**kw):
17+
super().__init__(**kw)
18+
self.name = name
19+
20+
def gob(self,lobby):
21+
self.lobby=lobby
22+
23+
def girl(self,rob):
24+
print(rob)
25+
26+
def __str__(self):
27+
return self.name
28+
29+
def strange(self,kk):
30+
print(kk)
31+
32+
class B(A):
33+
34+
def __init__(self, number, **kw):
35+
super().__init__(**kw)
36+
self.number = number
37+
def boy(self,champ):
38+
print(champ)
39+
def lol(self,gol):
40+
print(gol)
41+
def __call__(self):
42+
print(f"{self.name} + {self.number}+{self.cool}+{self.lobby}")
43+
44+
45+
if __name__ == "__main__":
46+
fire.Fire(B)

0 commit comments

Comments
 (0)