-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Bump mypy to 1.4.1 #10351
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
Bump mypy to 1.4.1 #10351
Conversation
With the latest mypy update, this test fails... but only with typeshed/test_cases/stdlib/builtins/check_dict.py Lines 52 to 54 in c402107
I can reproduce this locally with mypy 1.4 installed: typeshed>python tests/regr_test.py stdlib --platform win32 --python-version 3.7 3.8 3.9 3.10 3.11 3.12
Running mypy --platform win32 --python-version 3.7 on the standard library test cases... success
Running mypy --platform win32 --python-version 3.8 on the standard library test cases... success
Running mypy --platform win32 --python-version 3.9 on the standard library test cases... success
Running mypy --platform win32 --python-version 3.10 on the standard library test cases... success
Running mypy --platform win32 --python-version 3.11 on the standard library test cases... failure
test_cases\stdlib\builtins\check_dict.py:54: error:
Expression is of type "dict[Any, Any]", not "dict[str, str]" [assert-type]
assert_type(dict(string.split(".") for string in i3), Dict[str, str])
^
Running mypy --platform win32 --python-version 3.12 on the standard library test cases... failure
test_cases\stdlib\builtins\check_dict.py:54: error:
Expression is of type "dict[Any, Any]", not "dict[str, str]" [assert-type]
assert_type(dict(string.split(".") for string in i3), Dict[str, str])
^
Test completed with errors Anybody have any idea why this might be?? I'm struggling to reproduce the issue in mypy playground: https://mypy-play.net/?mypy=latest&python=3.11&gist=7a359709f41eb7a8a26cc8e201dbae79 |
I bisected using an editable install of mypy to find the mypy commit that broke this test:
Cc. @hauntsaninja |
Luckily this seems to be a typeshed-specific problem; most users of typeshed>mypy -c "reveal_type(dict(string.split('.') for string in ['a.b']))"
<string>:1: note: Revealed type is "builtins.dict[builtins.str, builtins.str]"
Success: no issues found in 1 source file
typeshed>mypy -c "reveal_type(dict(string.split('.') for string in ['a.b']))" --custom-typeshed-dir .
<string>:1: note: Revealed type is "builtins.dict[Any, Any]"
Success: no issues found in 1 source file This is presumably because typeshed |
I'll revert that mypy PR :-/ |
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
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.
Nice, thank you!
Thank you for the 1.4.1 release! |
No description provided.