Skip to content

Using decorator results in errors about untyped decorators #106

@ShravanSunder

Description

@ShravanSunder

With pylance (strict) i'm getting errors with injector decorators.

2024-07-04 0736 Brave Browser ivankorobkovpython-inject Python dependency injection

It doesn' tlook like the any paramspec or typevars in the definition

def params(**args_to_classes: Binding) -> Callable:
    """Return a decorator which injects args into a function.

    For example::

        @inject.params(cache=RedisCache, db=DbInterface)
        def sign_up(name, email, cache, db):
            pass
    """
    return _ParametersInjection(**args_to_classes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions