Generate an additional note for an existing ErrorInfo. This skip the logic in add_error_info() and goes to _add_error_info().
(
self,
file: str,
info: ErrorInfo,
message: str,
code: ErrorCode | None,
*,
only_once: bool = False,
priority: int = 0,
)
| 695 | self.seen_import_error = True |
| 696 | |
| 697 | def note_for_info( |
| 698 | self, |
| 699 | file: str, |
| 700 | info: ErrorInfo, |
| 701 | message: str, |
| 702 | code: ErrorCode | None, |
| 703 | *, |
| 704 | only_once: bool = False, |
| 705 | priority: int = 0, |
| 706 | ) -> None: |
| 707 | """Generate an additional note for an existing ErrorInfo. |
| 708 | |
| 709 | This skip the logic in add_error_info() and goes to _add_error_info(). |
| 710 | """ |
| 711 | info = ErrorInfo( |
| 712 | import_ctx=info.import_ctx, |
| 713 | local_ctx=info.local_ctx, |
| 714 | line=info.line, |
| 715 | column=info.column, |
| 716 | end_line=info.end_line, |
| 717 | end_column=info.end_column, |
| 718 | severity="note", |
| 719 | message=message, |
| 720 | code=code, |
| 721 | blocker=False, |
| 722 | only_once=only_once, |
| 723 | module=info.module, |
| 724 | target=info.target, |
| 725 | origin_span=info.origin_span, |
| 726 | priority=priority, |
| 727 | ) |
| 728 | self._add_error_info(file, info) |
| 729 | |
| 730 | def report_simple_error( |
| 731 | self, file: str, line: int, message: str, code: ErrorCode | None |
no test coverage detected