-
Notifications
You must be signed in to change notification settings - Fork 103
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 some type annotations #578
Conversation
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.
Any schema files that define pydantic
models cannot use future type annotations until atomate2
is 3.10+. That won't happen for at least another year.
You can revert all schema files with something like (untested!)
git checkout main -- **/schema/* **/schemas.py
Also, feel free to add yourself to |
I added @ab5424 yesterday (contributor to phonon workflow) |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #578 +/- ##
==========================================
- Coverage 75.62% 75.31% -0.31%
==========================================
Files 80 80
Lines 6711 6722 +11
Branches 992 992
==========================================
- Hits 5075 5063 -12
- Misses 1330 1354 +24
+ Partials 306 305 -1
|
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'm surprised the tests pass! Maybe the pydantic
restriction I mentioned no longer applies. Looks like the recent migration from pydantic
1 to 2 did away with that.
Summary
pyupgrade --py39-plus
Checklist
The easiest way to handle this is to run the following in the correct sequence on
your local machine. Start with running black on your new code. This will
automatically reformat your code to PEP8 conventions and removes most issues. Then run
ruff.
Run ruff on your code.
type check your code.