pythondi icon indicating copy to clipboard operation
pythondi copied to clipboard

Type annotation issue with inject decorator

Open Reve opened this issue 3 years ago • 0 comments

Hello,

I was wondering if there is a way to fix the type check error "Argument missing for parameter 'source'" when instantiating the DomainRepo object.

class DomainRepo:
    @inject()
    def __init__(self, source: DomainSource) -> None:
        self.db = source

domain_repo = DomainRepo() -> Argument missing for parameter "source"

Thank you

Reve avatar Feb 22 '23 10:02 Reve