Skip to content
New issue

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

Fix type annotations in ApplicationModule class #7

Merged
merged 2 commits into from
May 29, 2024

Conversation

artemyfmv
Copy link
Contributor

Hi!

First of all, I wanted to say that's a great job you've done. The framework is awesome!

There were two problems related to ApplicationModule which my linter was annoyingly complaining about.

First, internal mapping of handlers (ApplicationModule._handlers) were annotated to have a type str as a key, while it's actully possible to use both str and type[Message] (HandlerAlias).

Second, the linter couldn't understand that the return type of ApplicationModule.handler method is always a callable, so I added a return type annotation.

@pgorecki
Copy link
Owner

Hi @artemyfmv
PR looks good, thank you for contributing!

@pgorecki pgorecki merged commit 35727f1 into pgorecki:main May 29, 2024
13 checks passed
@pgorecki
Copy link
Owner

Publised in v0.11.1

@artemyfmv artemyfmv deleted the fix-app-module-type-annotations branch May 29, 2024 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants