(self, typ: Instance)
| 397 | return snapshot_simple_type(typ) |
| 398 | |
| 399 | def visit_instance(self, typ: Instance) -> SnapshotItem: |
| 400 | extra_attrs: SnapshotItem |
| 401 | if typ.extra_attrs: |
| 402 | extra_attrs = ( |
| 403 | tuple(sorted((k, v.accept(self)) for k, v in typ.extra_attrs.attrs.items())), |
| 404 | tuple(typ.extra_attrs.immutable), |
| 405 | ) |
| 406 | else: |
| 407 | extra_attrs = () |
| 408 | return ( |
| 409 | "Instance", |
| 410 | encode_optional_str(typ.type.fullname), |
| 411 | snapshot_types(typ.args), |
| 412 | ("None",) if typ.last_known_value is None else snapshot_type(typ.last_known_value), |
| 413 | extra_attrs, |
| 414 | ) |
| 415 | |
| 416 | def visit_type_var(self, typ: TypeVarType) -> SnapshotItem: |
| 417 | return ( |
nothing calls this directly
no test coverage detected