class Basic(object):
def kek(self):
return 'LOL'
class Dependency():
def use(self, mach: Basic):
mach.kek()
b = Dependency()
b.use(Basic)
class Basic(object):
def kek(self):
return 'LOL'
class Dependency():
def use(self, mach: Basic):
m = mach()
return m.kek()
b = Dependency()
print(b.use(Basic))
m = mach()
и потом уже возвращаешь результат выполнения его метода