-
Notifications
You must be signed in to change notification settings - Fork 868
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 types annotations for core.interface
#3822
Add types annotations for core.interface
#3822
Conversation
move dunder methods to the top add more types and tweaks relocate more dunder methods to top more types and format tweaks fix type error add types for composition help fix materialsproject#3792 (comment) reverse compare order for readability Revert "reverse compare order for readability" This reverts commit 05ea23a. Revert "help fix materialsproject#3792 (comment)" This reverts commit cae7aed. add types for `core.bonds` finish `core.ion` add some types revert non-interface changes
501764f
to
579083b
Compare
Not working on this for now, would reopen it later. |
@janosh Would appreciate it if you could review this at your convenience, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @DanielYang59! this all looks good. just 1 minor comment regarding the test change
@janosh Just ping you again in case it got forgotten :) No rush |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the consistent use of tuple
type aliases!
from pymatgen.core import Element | ||
from pymatgen.util.typing import CompositionLike, Matrix3D, MillerIndex, Tuple3Floats, Vector3D | ||
|
||
Tuple4Ints = tuple[int, int, int, int] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put it here because it doesn't seem to be needed by other code, tuple[int, int, int, int]
doesn't seem to be commonly used. But we could relocate it if needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, didn't see that. i would relocate right away
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @DanielYang59! 👍
Thanks for reviewing! Appreciate that |
Summary
core.interface
ClassVar
New custom type aliases