-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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 typing to the codebase #887
Comments
I like this and I'm happy to help out here. My suggestion is to do it gradually and split into multiple PRs, e.g., starting with Trainer and LightningModule, then Loggers and so on. |
@awaelchli thx and happy to see more your PRs soon :] |
awesome! let's keep this going as we keep making fixes |
It is not done yet lol |
@hadim I am looking at adding more typing to the rest of the code base and I am facing this issue again with failing imports (e.g. in tests). I think it is related to forward referencing / cyclic references. |
No, I haven't but an easy fix is to use types as string. Instead of: class Node:
def next() -> Node:
pass Try: class Node:
def next() -> 'Node':
pass |
Thanks for your suggestions. With just the string method there are no errors, but my IDE (pycharm) is complaining and suggesting that I still need to import Trainer (when I declare |
Wow, is there road map for Python 4.0? What will be the last 3.x series? @luiscape |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I guess we can close it as we are continuously adding with every new PR... |
Python typing is a good way to rapidly check for coding issue while developing and it also allows to generate documentation with types automatically.
It's a good first issue for someone who wants to contribute to PL.
The text was updated successfully, but these errors were encountered: