(self, typ: types.Type)
| 23 | return self.modules |
| 24 | |
| 25 | def _visit(self, typ: types.Type) -> None: |
| 26 | # Note: instances are needed for `class str(Sequence[str]): ...` |
| 27 | if ( |
| 28 | isinstance(typ, types.TypeAliasType) |
| 29 | or isinstance(typ, types.ProperType) |
| 30 | and isinstance(typ, types.Instance) |
| 31 | ): |
| 32 | # Avoid infinite recursion for recursive types. |
| 33 | if typ in self.seen_types: |
| 34 | return |
| 35 | self.seen_types.add(typ) |
| 36 | typ.accept(self) |
| 37 | |
| 38 | def _visit_type_tuple(self, typs: tuple[types.Type, ...]) -> None: |
| 39 | # Micro-optimization: Specialized version of _visit for lists |
no test coverage detected