-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Foundations for non-linear solver and polymorphic application #15287
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
Merged
ilevkivskyi
merged 19 commits into
python:master
from
ilevkivskyi:fix-generic-inference
Jun 18, 2023
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
08a8815
Start working on generic stuff
ilevkivskyi eb3a1e1
Make some progress
ilevkivskyi 52209c9
Add/reorganize tests
ilevkivskyi a64183d
Solve in topological order
ilevkivskyi 9191761
Delete tests that are not going to be supported
ilevkivskyi ba0f252
Support type aliases; more tests
ilevkivskyi 8eb04a9
Support callback protocols; more tests
ilevkivskyi ec8b695
Add some docstring/comments
ilevkivskyi d5eb5fa
Merge remote-tracking branch 'upstream/master' into fix-generic-infer…
ilevkivskyi 4c41c67
Some tweaks
ilevkivskyi 163720c
Minor fixes
ilevkivskyi 0bc41b0
Fix bugs
ilevkivskyi fefe27e
Make free variable choice stable
ilevkivskyi 4aca3ba
Special-case a corner case
ilevkivskyi 42cc4cf
Make self-type special-casing wider
ilevkivskyi d0a3d0d
Merge remote-tracking branch 'upstream/master' into fix-generic-infer…
ilevkivskyi 47db859
Temporary flag to hide new inference
ilevkivskyi 96d0f39
Merge remote-tracking branch 'upstream/master' into fix-generic-infer…
ilevkivskyi 66b4567
Address CR
ilevkivskyi 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
Some tweaks
- Loading branch information
commit 4c41c67bfc17baf5cc9cfdd0c8a25a3de4850eb4
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
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.
It would nice to have some unit tests for this (not need to do this in 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.
On reflection, I'm not sure if it's worth having unit tests for all of these functions. It may make more sense to have some unit tests for top-level functions. @jhance has recently written some unit tests that target type inference in
mypy/test/testconstraints.py
, and I think that they are helpful, even if we are not trying to cover all edge cases.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.
FWIW I think it is a good idea. Of course not all of these really needs to be tested, but for most of them it is a good thing. Especially for e.g.
transitive_closure()
since logic there is really easy to get wrong. I will however add them in a separate PR.