The violations whose route path is quoted on a line this change added. A new route is registered with its path as a string literal, so this names the endpoint the change brought in without needing the base document's own violation list.
(violations: Sequence[Violation], added: str)
| 144 | |
| 145 | |
| 146 | def introduced(violations: Sequence[Violation], added: str) -> tuple[Violation, ...]: |
| 147 | """The violations whose route path is quoted on a line this change added. A new |
| 148 | route is registered with its path as a string literal, so this names the endpoint |
| 149 | the change brought in without needing the base document's own violation list.""" |
| 150 | return tuple(v for v in violations if f'"{v.path}"' in added or f"'{v.path}'" in added) |
| 151 | |
| 152 | |
| 153 | def cmd_check(base: str) -> None: |