Skip to content

Conversation

@AlexWaygood
Copy link
Member

@AlexWaygoodAlexWaygood commented Jul 9, 2023

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.

@github-actions
Copy link
Contributor

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]

@JelleZijlstra
Copy link
Member

Seems like the mypy-primer hit is an example of python/mypy#13800. I wonder if it's because there's some change in whether mypy thinks a subclass of str and dict can exist.

@JelleZijlstraJelleZijlstra merged commit 81b8211 into python:mainJul 9, 2023
@AlexWaygoodAlexWaygood deleted the add-back-hash-methods branch July 9, 2023 15:44
Sign up for freeto 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

@AlexWaygood@JelleZijlstra