Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.1k
Sync typeshed#13386
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
Sync typeshed #13386
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Source commit: python/typeshed@a92da58
This comment has been minimized.
This comment has been minimized.
AlexWaygood commented Aug 11, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
The For most of the other primer errors, I think you need to reapply #13093. |
Fixes#13091 Co-authored-by: Ivan Levkivskyi <[email protected]>
This comment has been minimized.
This comment has been minimized.
jhance commented Aug 17, 2022
@sobolevn Do you have any ideas what is going on in stubtest? |
sobolevn commented Aug 17, 2022
I suspect that this test fails: mypy/mypy/test/teststubtest.py Lines 846 to 856 in 487b736
Why? I have no idea. Probably due to some typeshed changes. I think @AlexWaygood was working with |
AlexWaygood commented Aug 17, 2022
Yeah, I'm 99% sure this is somehow due to a typeshed change I made recently. I'll try to take a look sometime soon and suggest a fix! |
AlexWaygood commented Aug 18, 2022
The major change to The problematic line in the test is not actually the one @sobolevn suggested; it is this one: mypy/mypy/test/teststubtest.py Line 903 in 3ec1849
If you comment out that line, the test passes fine. |
AlexWaygood commented Aug 18, 2022
I figured it out. |
hauntsaninja commented Aug 18, 2022
Thanks for figuring it out! In general, weird errors in mypy tests are 90% fixture related issues |
Diff from mypy_primer, showing the effect of this PR on open source code: psycopg (https://github.com/psycopg/psycopg) + psycopg/psycopg/pq/_pq_ctypes.pyi:13: error: Unused "type: ignore" comment+ psycopg/psycopg/pq/_pq_ctypes.pyi:13: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:13: note: Error code "valid-type" not covered by "type: ignore" comment+ psycopg/psycopg/pq/_pq_ctypes.pyi:13: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:65: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:65: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:72: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:72: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:113: error: Unused "type: ignore" comment+ psycopg/psycopg/pq/_pq_ctypes.pyi:113: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:113: note: Error code "valid-type" not covered by "type: ignore" comment+ psycopg/psycopg/pq/_pq_ctypes.pyi:113: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:136: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:136: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:161: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:161: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:185: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:185: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:186: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:186: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:187: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:187: note: Perhaps you need "Callable[...]" or a callback protocol?+ psycopg/psycopg/pq/_pq_ctypes.pyi:189: error: Function "ctypes.pointer" is not valid as a type [valid-type]+ psycopg/psycopg/pq/_pq_ctypes.pyi:189: note: Perhaps you need "Callable[...]" or a callback protocol? prefect (https://github.com/PrefectHQ/prefect) - src/prefect/client.py:125: error: Argument 1 to "asynccontextmanager" has incompatible type "Callable[[Any], ContextManager[None]]"; expected "Callable[[Any], AsyncIterator[<nothing>]]"+ src/prefect/client.py:125: error: Argument 1 to "asynccontextmanager" has incompatible type "Callable[[Any], AbstractContextManager[None]]"; expected "Callable[[Any], AsyncIterator[<nothing>]]"- src/prefect/context.py:520: error: Incompatible types in assignment (expression has type "None", variable has type "ContextManager[PrefectObjectRegistry]")+ src/prefect/context.py:520: error: Incompatible types in assignment (expression has type "None", variable has type "AbstractContextManager[PrefectObjectRegistry]") pyinstrument (https://github.com/joerick/pyinstrument) - pyinstrument/vendor/decorator.py:279: error: Module "contextlib" has no attribute "GeneratorContextManager"; maybe "_GeneratorContextManager", "_AsyncGeneratorContextManager", or "ContextManager"?+ pyinstrument/vendor/decorator.py:279: error: Module "contextlib" has no attribute "GeneratorContextManager"; maybe "_GeneratorContextManager", "_AsyncGeneratorContextManager", or "AbstractContextManager"? |
Source commit:
python/typeshed@a92da58