kodemore / kink

Dependency injection container made for Python
MIT License
397 stars 25 forks source link

Version 0.6.4 broke mypy linting for `@inject` decorator #27

Closed akadlec closed 2 years ago

akadlec commented 2 years ago

After new release I'm not able pass typing check on all my projects :(

@inject(
    alias=IClient,
    bind={
        "event_dispatcher": EventDispatcher,
        "consumer": Consumer,
    },
)
class Client(IClient):
    def __init__(
        self,
        event_dispatcher: Optional[EventDispatcher] = None,
        consumer: Optional[Consumer] = None,
    ) -> None: ...

is not valid anymore :(

dkraczkowski commented 2 years ago

@akadlec Might be caused by this https://github.com/kodemore/kink/pull/25/files. Could you please provide some output from your linting?

akadlec commented 2 years ago

@dkraczkowski :

client.py:55: error: <nothing> not callable  [misc]
Found 1 error in 1 file (checked 7 source files)
akadlec commented 2 years ago

And you could find it in my gh action: https://github.com/FastyBird/redisdb-exchange-plugin/runs/6801070481?check_suite_focus=true

dkraczkowski commented 2 years ago

@akadlec Should be fixed in 6.5.0.

akadlec commented 2 years ago

@dkraczkowski thx