We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
class IMailService(ty.Protocol): def send_mail(self, subject: str, to: str) -> None: ... @inject_args_deps def business_logic(mail_service=Injectable(IMailService)): mail_service.send_mail("Hello", "world") # type of mail_service: Injectable[IMailService]
class IMailService: def send_mail(self, subject: str, to: str) -> None: ... @inject_args_deps def business_logic(mail_service=Injectable(IMailService)): mail_service.send_mail("Hello", "world") # type of mail_service: IMailService
The second type is desirable, but it doesn't work when the Injectable class in a typing.Protocol.
typing.Protocol
The text was updated successfully, but these errors were encountered:
fix: use ABC instead of ty.Protocol in examples due to #1
f7af29d
CaffeineDuck
No branches or pull requests
The second type is desirable, but it doesn't work when the Injectable class in a
typing.Protocol
.The text was updated successfully, but these errors were encountered: