Skip to content

Commit

Permalink
Fix issue295
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohan-Salwan committed Dec 3, 2021
1 parent 18a0a8f commit 18aa948
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fire/helptext.py
Expand Up @@ -124,12 +124,12 @@ def ReturnAllArgs(Inherit_classes_list):
Return: list of all arguments which is retrieved from parent classes.
"""
all_args = []
if len(Inherit_classes_list)>2:
for classes in Inherit_classes_list:
argspec_tuple=inspect.getargspec(classes)
args_list=argspec_tuple[0]
for arg in args_list[1:]:
all_args.append(arg)

for classes in Inherit_classes_list:
argspec_tuple=inspect.getargspec(classes)
args_list=argspec_tuple[0]
for arg in args_list[1:]:
all_args.append(arg)

return all_args

Expand Down
46 changes: 46 additions & 0 deletions go.py
@@ -0,0 +1,46 @@
import fire

class D:
def __init__(self,cool,**kw):
for e in kw:
print(e,cool)
self.cool=cool
def shit(self,sh,jp):
print(sh,jp)
def oye(self,oy):
print(oy)
def job(self,low):
print(low)
class A(D):

def __init__(self, name,**kw):
super().__init__(**kw)
self.name = name

def gob(self,lobby):
self.lobby=lobby

def girl(self,rob):
print(rob)

def __str__(self):
return self.name

def strange(self,kk):
print(kk)

class B(A):

def __init__(self, number, **kw):
super().__init__(**kw)
self.number = number
def boy(self,champ):
print(champ)
def lol(self,gol):
print(gol)
def __call__(self):
print(f"{self.name} + {self.number}+{self.cool}+{self.lobby}")


if __name__ == "__main__":
fire.Fire(B)

0 comments on commit 18aa948

Please sign in to comment.