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

Add Python type hints #1535

Open
rayanht opened this issue Dec 16, 2020 · 2 comments
Open

Add Python type hints #1535

rayanht opened this issue Dec 16, 2020 · 2 comments
Labels
API client Backend Feature Request Rest API Issue related to the Rest API backend

Comments

@rayanht
Copy link
Contributor

rayanht commented Dec 16, 2020

It would be nice to introduce typing hints to the codebase. We could even potentially enforce them using pytype.

I don't know if it's already on the roadmap but if it isn't then I'd like to take up the task.

@rayanht
Copy link
Contributor Author

rayanht commented Dec 16, 2020

Erratum: it seems like pytype operates without type annotations so a different tool would be required.

@kiddinn
Copy link
Contributor

kiddinn commented Dec 16, 2020

this is already on the horizon but hasn't made it's way into the roadmap.

The idea was to start with the aPI client, then move on to the Importer client before moving into the rest of the codebase, adn then do them one-by-one.

This is a fairly large undertaking, since there are a lot of moving parts that need to be addressed, and also adding mypy to make sure that typing is strictly adhered to.

There was an attempt already to start in the API client, but there was an issue with py version needing to be at least 3.7 for the type of typing that was required to be available in the language. That was stopping us a bit, since we needed a feature in typing that was introduced in 3.7 and is part of the 3.8 moving forward. We may have to wait a bit until we can deprecate 3.6 for sure.

@jaegeral jaegeral added API client Backend Code health Rest API Issue related to the Rest API backend labels Jul 7, 2021
@jaegeral jaegeral added this to the Future milestone Jul 7, 2021
@berggren berggren removed this from the Future milestone Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API client Backend Feature Request Rest API Issue related to the Rest API backend
Projects
None yet
Development

No branches or pull requests

4 participants