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

Method parse_dataclass_transform_field_specifiers

mypy/semanal.py:7974–7985  ·  view source on GitHub ↗
(self, arg: Expression)

Source from the content-addressed store, hash-verified

7972 return parameters
7973
7974 def parse_dataclass_transform_field_specifiers(self, arg: Expression) -> tuple[str, ...]:
7975 if not isinstance(arg, TupleExpr):
7976 self.fail('"field_specifiers" argument must be a tuple literal', arg)
7977 return ()
7978
7979 names = []
7980 for specifier in arg.items:
7981 if not isinstance(specifier, RefExpr):
7982 self.fail('"field_specifiers" must only contain identifiers', specifier)
7983 return ()
7984 names.append(specifier.fullname)
7985 return tuple(names)
7986
7987 # leafs
7988 def visit_int_expr(self, o: IntExpr, /) -> None:

Callers 1

Calls 4

failMethod · 0.95
isinstanceFunction · 0.85
tupleClass · 0.85
appendMethod · 0.80

Tested by

no test coverage detected