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

Ensure consistent type definitions in python functions #3660

Open
ninsbl opened this issue Apr 24, 2024 · 1 comment
Open

Ensure consistent type definitions in python functions #3660

ninsbl opened this issue Apr 24, 2024 · 1 comment
Labels
docs enhancement New feature or request Python Related code is in Python
Milestone

Comments

@ninsbl
Copy link
Member

ninsbl commented Apr 24, 2024

In order to be able to use type checking in IDEs, pre-commit, or CI, it would be good if input variables to python functions could be consistently annotated with variable types. That would also be a general improvement of the developer documentation.

This would be a longer, gradual effort. To start off, it could be clarified in the python committer guidelines, how annotation should be done...

see also post by @echoix in #3374 (comment)

@ninsbl ninsbl added enhancement New feature or request Python Related code is in Python docs labels Apr 24, 2024
@ninsbl ninsbl added this to the 8.5.0 milestone Apr 24, 2024
@echoix
Copy link
Member

echoix commented Apr 24, 2024

It will be easier to not have to do any workarounds for deprecated syntax if we start it with Python 3.9. Python 3.9 introduced [] in typings, deprecating a lot of special types that worked around.

I'll see if I can extract my proof of concept I did (I have to find the branch and if I had committed or not).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement New feature or request Python Related code is in Python
Projects
None yet
Development

No branches or pull requests

2 participants