Hello,
I caught a type error with IntelliJ IDE caused by the inferred type of inject.attr(IFoo) is not IFoo but Type[IFoo]. Inspecting the library, I found the two different annotation of type:
def attr(cls: T) -> T:
# type: (Binding) -> T
"""Return a attribute injection (descriptor)."""
return _AttributeInjection(cls)
After changing cls: T with cls: Binding, the inference goes right.
Is there any reason for these different annotations (backward compatibility, etc.)?
I should have made a PR for that if it is an unintentional mistake but asked at first for clarification.
Hello, I caught a type error with IntelliJ IDE caused by the inferred type of
inject.attr(IFoo)
is notIFoo
butType[IFoo]
. Inspecting the library, I found the two different annotation of type:After changing
cls: T
withcls: Binding
, the inference goes right.Is there any reason for these different annotations (backward compatibility, etc.)? I should have made a PR for that if it is an unintentional mistake but asked at first for clarification.
Thanks for your works.