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

Type hinting for common functions #1260

Closed
cyberw opened this issue Feb 20, 2020 · 4 comments · Fixed by #1582
Closed

Type hinting for common functions #1260

cyberw opened this issue Feb 20, 2020 · 4 comments · Fixed by #1582

Comments

@cyberw
Copy link
Collaborator

cyberw commented Feb 20, 2020

Now that we have updated to python 3.6 we can have sensible type hinting ("->" syntax for methods for example). We should add that.

@heyman heyman added this to the 1.0 milestone Mar 10, 2020
@anuj-ssharma
Copy link
Contributor

Hey, I was hoping to pick this up ! What do you mean by "common" functions in this context ?

@cyberw
Copy link
Collaborator Author

cyberw commented Mar 29, 2020

Hey, I was hoping to pick this up ! What do you mean by "common" functions in this context ?

I am primarily talking about the ones exposed to the end user.

The end goal is that things like self.client.post() and basic Locust properties (for example wait_time) should be picked up by a user's IDE (for example vscode) and type errors be picked up when checked with MyPy (http://mypy-lang.org/).

@cyberw
Copy link
Collaborator Author

cyberw commented Apr 22, 2020

Lets do this after 1.0. I tried some stuff, but it is harder than it seems and I dont want to delay 1.0

@cyberw cyberw removed this from the 1.0 milestone Apr 22, 2020
@heyman
Copy link
Member

heyman commented Apr 22, 2020

The API documentation should provide a good list of functions and methods that we would like to add type hinting for.

cyberw added a commit that referenced this issue Sep 21, 2020
… done). Removes NoClientWarningRaiser, because it was hard to type check and hasn't been relevant for a long time. Not really finished.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants