(name)
| 13700 | } |
| 13701 | } |
| 13702 | findNamedType(name) { |
| 13703 | const custom_class = torch._C.getCustomClass(name.qualifiedName()); |
| 13704 | if (custom_class) { |
| 13705 | return custom_class; |
| 13706 | } |
| 13707 | this.parseSourceIfNeeded(name.prefix()); |
| 13708 | const key = name.qualifiedName(); |
| 13709 | const it = this._to_be_defined.get(key); |
| 13710 | if (it && it instanceof ast.ClassDef) { |
| 13711 | this._to_be_defined.delete(key); |
| 13712 | this.importNamedType(name.prefix(), it); |
| 13713 | } |
| 13714 | return this._cu.get_type(name); |
| 13715 | } |
| 13716 | importNamedType(qualifier, class_def) { |
| 13717 | const qualified_name = new torch._C.QualifiedName(`${qualifier}.${class_def.name}`); |
| 13718 | if (class_def.bases.length === 0) { |
no test coverage detected