Lines Matching refs:group
40 # * max and min use positional only with an optional group
471 for group in reversed(l):
472 accumulator = list(group) + accumulator
486 for group in l:
487 accumulator.extend(group)
654 has_option_groups = parameters and (parameters[0].group or parameters[-1].group)
1213 def group_to_variable_name(group):
1214 adjective = "left_" if group < 0 else "right_"
1215 return "group_" + adjective + str(abs(group))
1224 # Here group D are required, and all other groups are optional.
1225 # (Group D's "group" is actually None.)
1242 group = None
1249 group_id = p.group
1252 group = []
1254 left.append(group)
1256 group = required
1258 right.append(group)
1259 group.append(p)
1276 group_ids = {p.group for p in subset} # eliminate duplicates
1345 # insert group variable
1346 group = p.group
1347 if last_group != group:
1348 last_group = group
1349 if group:
1350 group_name = self.group_to_variable_name(group)
1613 return match.group(1) if match else None
1683 arguments = match.group(1) if match else None
2390 docstring=None, group=0):
2398 self.group = group
2419 'docstring': self.docstring, 'group': self.group,
2748 if not default and self.parameter.group:
4069 self.group = 0
4422 # * Each group must contain at least one parameter.
4423 # * Each group may contain at most one group, which must be the furthest
4424 # thing in the group from the required parameters. (The nested group
4425 # must be the first in the group when it's before the required
4426 # parameters, and the last thing in the group when after the required
4428 # * There may be at most one (top-level) group to the left or right of
4435 # * Each group must contain at least one parameter.
4453 # 2: ps_group_before. in a group, before required parameters.
4458 # 5: ps_group_after. in a group, after required parameters.
4482 p.group = -p.group
4518 if not self.group:
4523 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".a)")
4728 if self.group:
4729 fail("A 'self' parameter cannot be in an optional group.")
4743 if self.group:
4744 fail("A 'defining_class' parameter cannot be in an optional group.")
4749 p = Parameter(parameter_name, kind, function=self.function, converter=converter, default=value, group=self.group)
4792 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".b)")
4793 self.group += 1
4796 if not self.group:
4798 if not any(p.group == self.group for p in self.function.parameters.values()):
4799 fail("Function " + self.function.name + " has an empty group.\nAll groups must contain at least one parameter.")
4800 self.group -= 1
4806 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".c)")
4813 if (self.parameter_state not in (self.ps_required, self.ps_optional, self.ps_right_square_after, self.ps_group_before)) or self.group:
4814 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".d)")
4862 if self.group:
4916 p.right_bracket_count = abs(p.group)