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 hinting on Events #1705

Merged
merged 3 commits into from
Feb 16, 2021
Merged

fix type hinting on Events #1705

merged 3 commits into from
Feb 16, 2021

Conversation

mrijken
Copy link
Contributor

@mrijken mrijken commented Feb 15, 2021

When I add an event listener, my IDE complains about the type of the decorated function. This will fix that by making sure that the annotation of the attributes of Events are an instance of EventHook (and not the class EventHook).

@cyberw
Copy link
Collaborator

cyberw commented Feb 16, 2021

Great stuff. I tried fixing this a while back, but it impacted documentation generation so I backed out (this seems to look fine though). There are some other places too that need this kind of fix (in the User class for instance) but we can do it some other time...

@cyberw cyberw merged commit 48b0bc7 into locustio:master Feb 16, 2021
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