Parse opening parameter group symbol '['.
(self, function: Function)
| 1188 | self.deprecated_positional = version |
| 1189 | |
| 1190 | def parse_opening_square_bracket(self, function: Function) -> None: |
| 1191 | """Parse opening parameter group symbol '['.""" |
| 1192 | match self.parameter_state: |
| 1193 | case ParamState.START | ParamState.LEFT_SQUARE_BEFORE: |
| 1194 | self.parameter_state = ParamState.LEFT_SQUARE_BEFORE |
| 1195 | case ParamState.REQUIRED | ParamState.GROUP_AFTER: |
| 1196 | self.parameter_state = ParamState.GROUP_AFTER |
| 1197 | case st: |
| 1198 | fail(f"Function {function.name!r} " |
| 1199 | f"has an unsupported group configuration. " |
| 1200 | f"(Unexpected state {st}.b)") |
| 1201 | self.group += 1 |
| 1202 | function.docstring_only = True |
| 1203 | |
| 1204 | def parse_closing_square_bracket(self, function: Function) -> None: |
| 1205 | """Parse closing parameter group symbol ']'.""" |