Set the path and module id of the current file.
(
self, file: str, module: str | None, options: Options, scope: Scope | None = None
)
| 548 | return remove_path_prefix(file, self.ignore_prefix) |
| 549 | |
| 550 | def set_file( |
| 551 | self, file: str, module: str | None, options: Options, scope: Scope | None = None |
| 552 | ) -> None: |
| 553 | """Set the path and module id of the current file.""" |
| 554 | # The path will be simplified later, in render_messages. That way |
| 555 | # * 'file' is always a key that uniquely identifies a source file |
| 556 | # that mypy read (simplified paths might not be unique); and |
| 557 | # * we only have to simplify in one place, while still supporting |
| 558 | # reporting errors for files other than the one currently being |
| 559 | # processed. |
| 560 | self.file = file |
| 561 | self.target_module = module |
| 562 | self.scope = scope |
| 563 | self.options = options |
| 564 | |
| 565 | def set_file_ignored_lines( |
| 566 | self, file: str, ignored_lines: dict[int, list[str]], ignore_all: bool = False |
no outgoing calls
no test coverage detected