MCPcopy Index your code
hub / github.com/python/mypy / func_decl

Method func_decl

mypyc/test/test_ircheck.py:56–64  ·  view source on GitHub ↗
(self, name: str, ret_type: RType | None = None)

Source from the content-addressed store, hash-verified

54 return block
55
56 def func_decl(self, name: str, ret_type: RType | None = None) -> FuncDecl:
57 if ret_type is None:
58 ret_type = none_rprimitive
59 return FuncDecl(
60 name=name,
61 class_name=None,
62 module_name="module",
63 sig=FuncSignature(args=[], ret_type=ret_type),
64 )
65
66 def test_valid_fn(self) -> None:
67 assert_no_errors(

Callers 11

test_valid_fnMethod · 0.95
test_valid_gotoMethod · 0.95
test_invalid_gotoMethod · 0.95
test_invalid_assignMethod · 0.95
test_duplicate_opMethod · 0.95
test_pprintMethod · 0.95

Calls 2

FuncDeclClass · 0.90
FuncSignatureClass · 0.90

Tested by

no test coverage detected