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

[ENH] Type hints #286

Open
BCurbs opened this issue Nov 14, 2022 · 7 comments
Open

[ENH] Type hints #286

BCurbs opened this issue Nov 14, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@BCurbs
Copy link
Contributor

BCurbs commented Nov 14, 2022

Proposed new feature or change:

When using the library, it is hard to either manually mark things as certain types, as the data classes aren't easily exposed, and the methods don't say what type they return, so ides have problems with seeing what methods are available for an object.

@theOehrly theOehrly added the enhancement New feature or request label Nov 14, 2022
@theOehrly theOehrly added this to the v3.0.0 milestone Nov 14, 2022
@theOehrly
Copy link
Owner

Yes, this is absolutely on the list of things that I'd like to get done. All new parts of FastF1 are already written with type hints. And older code should get type hints as well.

@BCurbs
Copy link
Contributor Author

BCurbs commented Nov 14, 2022

Could you take a look at draft pr #287 @theOehrly ? I think it should add a lot, though I went through quite quickly, and if I'm on the right track, I'll go through more comprehensively.

@BCurbs
Copy link
Contributor Author

BCurbs commented Jan 10, 2023

This is at least mostly complete, if it is fully satisfied by #287, this can be closed.

@theOehrly
Copy link
Owner

I'll leave it open for now as a general reminder, and there are still some places that might need improvement.

@Casper-Guo
Copy link
Contributor

I can work on this. What are some parts of the library that still need type hints added?

@theOehrly
Copy link
Owner

Large parts of FastF1 have type hints now. But there are some places throughout where they are still missing. I can't narrow it down really.

@theOehrly theOehrly removed this from the v3.0.0 milestone Apr 29, 2023
@borolepratik
Copy link

although i haven't tested mypy with FastF1, it may help - https://stackoverflow.com/a/43187908

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

No branches or pull requests

4 participants