(self, lineno: int | None = None)
| 1588 | parameters=parameters).rstrip() |
| 1589 | |
| 1590 | def check_remaining_star(self, lineno: int | None = None) -> None: |
| 1591 | assert isinstance(self.function, Function) |
| 1592 | |
| 1593 | if self.keyword_only: |
| 1594 | symbol = '*' |
| 1595 | elif self.deprecated_positional: |
| 1596 | symbol = '* [from ...]' |
| 1597 | else: |
| 1598 | return |
| 1599 | |
| 1600 | for p in reversed(self.function.parameters.values()): |
| 1601 | if self.keyword_only: |
| 1602 | if p.kind in { |
| 1603 | inspect.Parameter.KEYWORD_ONLY, |
| 1604 | inspect.Parameter.VAR_POSITIONAL, |
| 1605 | inspect.Parameter.VAR_KEYWORD |
| 1606 | }: |
| 1607 | return |
| 1608 | elif self.deprecated_positional: |
| 1609 | if p.deprecated_positional == self.deprecated_positional: |
| 1610 | return |
| 1611 | break |
| 1612 | |
| 1613 | fail(f"Function {self.function.name!r} specifies {symbol!r} " |
| 1614 | f"without following parameters.", line_number=lineno) |
| 1615 | |
| 1616 | def check_previous_star(self) -> None: |
| 1617 | assert isinstance(self.function, Function) |
no test coverage detected