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

Method anal_array

mypy/typeanal.py:1887–1906  ·  view source on GitHub ↗
(
        self,
        a: Iterable[Type],
        nested: bool = True,
        *,
        allow_param_spec: bool = False,
        allow_param_spec_literals: bool = False,
        allow_unpack: bool = False,
    )

Source from the content-addressed store, hash-verified

1885 return self.tvar_scope.get_binding(tvar_node) is not None
1886
1887 def anal_array(
1888 self,
1889 a: Iterable[Type],
1890 nested: bool = True,
1891 *,
1892 allow_param_spec: bool = False,
1893 allow_param_spec_literals: bool = False,
1894 allow_unpack: bool = False,
1895 ) -> list[Type]:
1896 old_allow_param_spec_literals = self.allow_param_spec_literals
1897 self.allow_param_spec_literals = allow_param_spec_literals
1898 res: list[Type] = []
1899 for t in a:
1900 res.append(
1901 self.anal_type(
1902 t, nested, allow_param_spec=allow_param_spec, allow_unpack=allow_unpack
1903 )
1904 )
1905 self.allow_param_spec_literals = old_allow_param_spec_literals
1906 return self.check_unpacks_in_list(res)
1907
1908 def anal_type(
1909 self,

Calls 3

anal_typeMethod · 0.95
check_unpacks_in_listMethod · 0.95
appendMethod · 0.80

Tested by

no test coverage detected