Open 10zinten opened 1 year ago
since, we have separated git logic from OpenPechaFS into OpenPechaGitRepo with https://github.com/OpenPecha/Toolkit/pull/224 the create_opf should be flexible enough to return any type of OpenPecha variant.
OpenPechaFS
OpenPechaGitRepo
create_opf
OpenPecha
Cons:
def create_opf(self, ..., pecha_class: OpenPecha): pecha = pecha_class(metadata=metadata) ... return pecha
def create_opf(self, ..., pecha: OpenPecha): ... return pecha
I like the object dependency injection better
since, we have separated git logic from
OpenPechaFS
intoOpenPechaGitRepo
with https://github.com/OpenPecha/Toolkit/pull/224 thecreate_opf
should be flexible enough to return any type ofOpenPecha
variant.Suggestions
Class dependency injection
Cons:
Object dependency injection
Cons: