Lines Matching refs:fields
54 inheritance. fields and attributes from the parent class are
58 for attr in "fields", "attributes":
112 All nodes have fields and attributes. Fields may be other nodes, lists,
120 fields: t.Tuple[str, ...] = ()
127 def __init__(self, *fields: t.Any, **attributes: t.Any) -> None:
130 if fields:
131 if len(fields) != len(self.fields):
132 if not self.fields:
135 f"{type(self).__name__!r} takes 0 or {len(self.fields)}"
136 f" argument{'s' if len(self.fields) != 1 else ''}"
138 for name, arg in zip(self.fields, fields):
150 """This method iterates over all fields that are defined and yields
151 ``(key, value)`` tuples. Per default all fields are returned, but
152 it's possible to limit that to some fields by providing the `only`
156 for name in self.fields:
173 over all fields and yields the values of they are nodes. If the value
213 if "ctx" in node.fields:
247 args_str = ", ".join(f"{a}={getattr(self, a, None)!r}" for a in self.fields)
257 if not node.fields:
260 for idx, field in enumerate(node.fields):
297 fields = ("body",)
306 fields = ("nodes",)
313 fields = ("template",)
326 fields = ("target", "iter", "body", "else_", "test", "recursive")
338 fields = ("test", "body", "elif_", "else_")
351 fields = ("name", "args", "defaults", "body")
363 fields = ("call", "args", "defaults", "body")
373 fields = ("body", "filter")
385 fields = ("targets", "values", "body")
398 fields = ("name", "body", "scoped", "required")
408 fields = ("template", "with_context", "ignore_missing")
417 fields = ("template", "target", "with_context")
435 fields = ("template", "names", "with_context")
444 fields = ("node",)
451 fields = ("target", "node")
459 fields = ("target", "filter", "body")
491 fields = ("left", "right")
516 fields = ("node",)
546 fields = ("name", "ctx")
557 fields = ("name", "attr")
582 fields = ("value",)
609 fields = ("data",)
627 fields = ("items", "ctx")
645 fields = ("items",)
658 fields = ("items",)
671 fields = ("key", "value")
685 fields = ("key", "value")
699 fields = ("test", "expr1", "expr2")
738 fields = ("node", "name", "args", "kwargs", "dyn_args", "dyn_kwargs")
787 filter, the other fields are the same as :class:`Call`.
823 fields = ("node", "args", "kwargs", "dyn_args", "dyn_kwargs")
834 fields = ("node", "arg", "ctx")
858 fields = ("node", "attr", "ctx")
880 fields = ("start", "stop", "step")
901 fields = ("nodes",)
914 fields = ("expr", "ops")
940 fields = ("op", "expr")
1035 fields = ("name",)
1047 fields = ("identifier", "name")
1059 fields = ("importname",)
1071 fields = ("name",)
1084 fields = ("expr",)
1099 fields = ("expr",)
1152 fields = ("body",)
1170 fields = ("context", "body")
1184 fields = ("options",)
1194 fields = ("body",)