Python type signature for builtin api

68 Views Asked by At

Python typing makes progress. There is a tool, such us mypy, for transforming application code to insert type signatures.

I check python 3.12 and inspect.signature() returns no trace of types for builtin function pickle.dumps

Python 3.12.0a6 (main, Mar  7 2023, 21:53:22) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import inspect
>>> import pickle
>>> inspect.signature(pickle.dumps)
<Signature (obj, protocol=None, *, fix_imports=True, buffer_callback=None)>
>>> inspect.signature(pickle.dumps).return_annotation
<class 'inspect._empty'>

Is there a project trying to do best effort in covering Builtin Python API with type signatures?

0

There are 0 best solutions below