MCPcopy Create free account
hub / github.com/python/mypy / infer_arg_sig_from_anon_docstring

Function infer_arg_sig_from_anon_docstring

mypy/stubdoc.py:422–427  ·  view source on GitHub ↗

Convert signature in form of "(self: TestClass, arg0: str='ada')" to List[TypedArgList].

(docstr: str)

Source from the content-addressed store, hash-verified

420
421
422def infer_arg_sig_from_anon_docstring(docstr: str) -> list[ArgSig]:
423 """Convert signature in form of "(self: TestClass, arg0: str='ada')" to List[TypedArgList]."""
424 ret = infer_sig_from_docstring("stub" + docstr, "stub")
425 if ret:
426 return ret[0].args
427 return []
428
429
430def infer_ret_type_sig_from_docstring(docstr: str, name: str) -> str | None:

Callers 2

get_function_sigMethod · 0.90

Calls 1

infer_sig_from_docstringFunction · 0.85

Used in the wild real call sites across dependent graphs

searching dependent graphs…