-
Notifications
You must be signed in to change notification settings - Fork 33
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
hydra_zen non-diffs #126
Comments
The lines aren't the same, the numbers are changing (e.g. 2155 to 2179). I think mypy internally assigns a number of each type variable, and for whatever reason those numbers can be unstable. Maybe mypy-primer could put some heuristic in its diffs to get rid of those changes. I think GitHub doesn't color the diff because there are unpaired backticks in the text. |
I guess the difference is that mypy is giving you a different TypeVar ID between the two runs. E.g. on the first run there's a ParamSpec with ID I don't know what the guarantees are about the specific numbers mypy uses for TypeVar IDs. I suspect they're not guaranteed to be stable between runs even if there are no changes in type inference. I'd imagine that hydra-zen is affected in particular here because they use a lot of higher-order functions, which is where the specific ID of each TypeVar becomes especially relevant when solving a certain TypeVar. I guess mypy_primer could implement some custom logic that filters out diffs like this where the only change between the two runs is the numeric value of the TypeVar IDs |
For a while now, mypy_primer has produced fake "diffs" for hydra_zen for each typeshed PR. They look like this:
As far as I can tell, the differing lines are actually equal. GitHub even refuses to color this diff. I'm not sure what's going on here.
The text was updated successfully, but these errors were encountered: