(self)
| 28 | self._ref_to_doc.update({_id: docname for _id in doctree.ids}) |
| 29 | |
| 30 | def _add_strict_list(self) -> None: |
| 31 | strict_flags: list[str] |
| 32 | _, strict_flags, _ = define_options() |
| 33 | strict_part = ", ".join(f":option:`{s} <mypy {s}>`" for s in strict_flags) |
| 34 | if ( |
| 35 | not strict_part |
| 36 | or strict_part.isspace() |
| 37 | or len(strict_part) < 20 |
| 38 | or len(strict_part) > 2000 |
| 39 | ): |
| 40 | raise ValueError(f"{strict_part=}, which doesn't look right (by a simple heuristic).") |
| 41 | self.strict_file.write_text( |
| 42 | "For this version of mypy, the list of flags enabled by strict is: " + strict_part |
| 43 | ) |
| 44 | |
| 45 | def _verify_error_codes(self) -> None: |
| 46 | from mypy.errorcodes import error_codes |
no test coverage detected