Commit Graph
12 Commits
Author SHA1 Message Date
Carl Meyer fe11cc058c TypeAliasType.__type_params__ can return forms from typing_extensions (#14848) 2025-10-07 16:45:48 +01:00
Carl Meyer f1f3c12801 TypeAliasType type_params accepts typing_extensions.TypeVar also (#14840) 2025-10-06 21:57:15 +01:00
Carl Meyer 7ca8303672 CodeType.co_linetable is of type bytes (#7856)
Although the specific format of the bytes is opaque and undocumented, the fact that it will be bytes is stable.

This is necessary in order for type checkers to allow creating one code object from another, since the `lnotab`
positional argument to `__init__` is typed as bytes.
2022-05-17 11:49:12 -07:00
Carl Meyer 003f916acd Add SymbolTableFactory to symtable stub (#5998)
This is not documented API, but AFAIR the typeshed policy is now that stubs should preferably reflect reality rather than solely documented API.

See https://github.com/python/cpython/blob/main/Lib/symtable.py#L21
2021-09-03 00:15:17 -07:00
Carl Meyer 8b28753b64 Update and improve py_compile module stubs. (#3240) 2019-09-17 19:48:26 -07:00
Carl Meyer fcb97fe8f1 Overload ast.parse to recognize that mode=exec means Module return. (#3039) 2019-06-17 23:27:14 +02:00
Carl Meyer 1c3ec74d13 Remove incomplete thrift stubs that cause false positives. (#1827) 2018-01-26 15:26:14 -08:00
Carl Meyer 9e76d44b09 Fix sys.setprofile annotation. (#1679)
`sys.setprofile(None)` is valid, and is in fact the only way to clear a profiler once set.
2017-10-23 15:26:58 -04:00
Carl Meyer a19d4e34c3 Add 3-argument overload for asyncio.gather. (#1644) 2017-10-03 11:41:25 -07:00
Carl Meyer 802f3b21b3 Fix __init__ signature for unittest.mock.MagicMock. (#1388) 2017-06-04 10:08:56 -07:00
Carl Meyer 6d88431403 Correct the type of MethodType.__func__. (#1383)
See python/mypy#3484 for background.
2017-06-02 11:06:07 -07:00
Carl Meyer 166e56a8f0 Fix missing 'type: ' in opcode.pyi (#1143) 2017-04-05 17:06:09 -07:00