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

Stop declaring "fake" class level variables in Environment, User and StatsEntry #1948

Merged

Conversation

cyberw
Copy link
Collaborator

@cyberw cyberw commented Nov 29, 2021

Do it in constructor/instance level, where they belong instead.

The only benefit to having them on class level was so that they got documented properly, but it works as long as they are definied in init as well.

While this shouldnt be a breaking change for any "normal" usage of Locust, I think we need to do some testing to ensure that we dont need to bump major version.

Added some type hints as well.

…stats. Do it in constructor/instance level, where they belong instead.

The only benefit to having them on class level was so that they got documented properly, but it works as long as they are definied in __init__ as well.

While this shouldnt be a breaking change for any "normal" usage of Locust, I think we need to do some testing to ensure that we dont need to bump major version.

Added some type hints as well.
@cyberw cyberw changed the title Stop declaring "fake" class level variables in Environment, User and stats Stop declaring "fake" class level variables in Environment, User and StatsEntry Nov 29, 2021
@cyberw cyberw force-pushed the remove-fake-class-level-variables-from-Environment-and-Users branch from 9fe3e83 to 5d84379 Compare November 29, 2021 19:39
@cyberw cyberw merged commit c205e86 into master Dec 8, 2021
@cyberw cyberw deleted the remove-fake-class-level-variables-from-Environment-and-Users branch March 22, 2022 10:18
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.

None yet

1 participant