-
Notifications
You must be signed in to change notification settings - Fork 876
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 type annotations for io.vasp.inputs/optics
#3740
Merged
Merged
Changes from 21 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
a3ac1b5
some easy mypy fixes
DanielYang59 bedb74f
ruff check pymatgen/io/vasp --select ANN204 --unsafe-fixes --fix
janosh ca7cbfc
Merge branch 'master' into ruff-typing
DanielYang59 05c715d
Merge branch master into kpoints-tuple-type
DanielYang59 5439209
add type for io.vasp.help
DanielYang59 3c0194a
add timeout 60 sec for requests.get
DanielYang59 51714d2
Merge branch master into ruff-typing
DanielYang59 634239a
pre-commit auto-fixes
pre-commit-ci[bot] 865bd01
add timeout 60 sec for requests.get
DanielYang59 1a1752a
fix default value of default_names
DanielYang59 f3aa520
finish poscar.from_str
DanielYang59 49c98c0
finish Poscar
DanielYang59 95dfe0a
finish Incar
DanielYang59 ad4ec38
temp save for potcarsingle
DanielYang59 5b866b3
put dunder methods close and to the top
DanielYang59 d75ca24
put properties close and to the top
DanielYang59 98601e2
put properties close and to the top
DanielYang59 b217092
replace str with PathLike
DanielYang59 f55d833
add types for optics
DanielYang59 1d18862
Merge branch 'master' into ruff-typing
DanielYang59 ff52da8
suppress some overload
DanielYang59 a02e225
remove None type from completely untyped classes
DanielYang59 8380b8c
pre-commit auto-fixes
pre-commit-ci[bot] 0f169c0
fix type error outside io.vasp
DanielYang59 8f7cd58
Merge branch 'ruff-typing' of github.com:DanielYang59/pymatgen into r…
DanielYang59 c46a3cd
check for None in Incar init
DanielYang59 cee21ef
ruff fix
DanielYang59 465854f
Merge branch 'master' into ruff-typing
DanielYang59 aab17cd
Merge branch 'master' into ruff-typing
DanielYang59 16d2685
allow None
DanielYang59 555e609
Merge branch 'ruff-typing' of github.com:DanielYang59/pymatgen into r…
DanielYang59 fa9a610
Merge branch 'master' into ruff-typing
DanielYang59 e8055cd
fix types
DanielYang59 2954c80
replace `defaultdict` with specific type
DanielYang59 4c76814
revert accidental changes
DanielYang59 2945742
fix test
DanielYang59 2991771
fix tests
DanielYang59 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we make the types more specific?
list
/dict
/set
/... alone don't add any information for the reader.dict[str, CoordinationGeometry]
,list[Structure]
, etc. is more helpfulThere 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.
Yes this is very true. But in this PR I was working on adding types for
io.vasp
, sometimesmypy
would complain about other unrelated modules (withneed annotation for some line
) which I haven't yet got time to look closer into. So in these case I just put a general type to stopmypy
from complaining (if I look closely into every module, then the work can never be done).But I would keep this in mind and try to more specific types :)