Skip to content

Conversation

@TheTripleV
Copy link

Fixes #10424.

I only checked the types in builtins.pyi

@github-actions
Copy link
Contributor

github-actions bot commented Jul 9, 2023

Diff from mypy_primer, showing the effect of this PR on open source code:

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/utilities/templating.py:132: error: Incompatible types in assignment (expression has type "str", variable has type "dict[Any, Any]")  [assignment]
- src/prefect/utilities/templating.py:134: error: Incompatible types in assignment (expression has type "str", variable has type "dict[Any, Any]")  [assignment]
- src/prefect/utilities/templating.py:282: error: Incompatible types in assignment (expression has type "str", variable has type "dict[Any, Any]")  [assignment]
- src/prefect/utilities/templating.py:284: error: Incompatible types in assignment (expression has type "str", variable has type "dict[Any, Any]")  [assignment]

@AlexWaygood
Copy link
Member

Thanks! Since #8465 didn't fix any known problems, however (just fixed some stylistic nits that we had), I'm inclined to revert the whole PR: see #10426. You're right that we missed this important detail of Python's semantics when it comes to determining whether an object is hashable or not :-)

JelleZijlstra pushed a commit that referenced this pull request Jul 9, 2023
…10426)

Reverts #8465
Fixes #10424
Closes #10425

#8465 caused regressions: see #10424 and python/mypy#13800. Since it didn't fix any known problems (just some stylistic nits that we had), let's just revert the PR.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builtins are incorrectly hinted as unhashable

2 participants