(self, type_map: dict[str, Type | None], context: Context)
| 1844 | self.note(f'Revealed type is "{typ.accept(visitor)}"', context) |
| 1845 | |
| 1846 | def reveal_locals(self, type_map: dict[str, Type | None], context: Context) -> None: |
| 1847 | # To ensure that the output is predictable on Python < 3.6, |
| 1848 | # use an ordered dictionary sorted by variable name |
| 1849 | sorted_locals = dict(sorted(type_map.items(), key=lambda t: t[0])) |
| 1850 | if sorted_locals: |
| 1851 | self.note("Revealed local types are:", context) |
| 1852 | for k, v in sorted_locals.items(): |
| 1853 | visitor = TypeStrVisitor(options=self.options) |
| 1854 | self.note(f" {k}: {v.accept(visitor) if v is not None else None}", context) |
| 1855 | else: |
| 1856 | self.note("There are no locals to reveal", context) |
| 1857 | |
| 1858 | def unsupported_type_type(self, item: Type, context: Context) -> None: |
| 1859 | self.fail( |
no test coverage detected