-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Improve type hinting #261
Improve type hinting #261
Conversation
`make`/`prepare` now return the correct type depending on `_quantity`
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 contribution, but the CI is breaking due to a broken from __future__
import.
These changes actually introduce some breaks on my local machine for
Compared with no failures against @berinhard @amureki It seems like the |
Fixed mypy issues (and to follow up on what @timjklein36 was saying, the gh linter action definitely isn't working correctly -- if you drill into the output of the tox step, it's not doing the work it should be) |
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 updates @SmileyChris!
@timjklein36 I did run the mypy check locally and it's passsing:
$ python -m mypy model_bakery
Success: no issues found in 10 source files
Is it failing for you even after the updates on this PR?
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 have some questions about the implementation. Some of my confusion may come from not being very familiar with generic types in Python, so I apologize if that is the case.
@berinhard |
Renamed. The same overload patterns could also be applied to recipes, but for the sake of smaller PRs, I can submit that separately. |
I guessed that it is because of different Python versions in GitHub Actions config and tox. Here is a separate PR to fix it: |
I've come here being ready to make exaclty same PR. Nice to see it's already done and merged! 🎉 |
make
/prepare
now return the correct type depending on_quantity