(arg: PyObjectRef, vm: &VirtualMachine)
| 269 | } |
| 270 | |
| 271 | fn string_to_forwardref(arg: PyObjectRef, vm: &VirtualMachine) -> PyResult { |
| 272 | // Import annotationlib.ForwardRef and create a ForwardRef |
| 273 | let annotationlib = vm.import("annotationlib", 0)?; |
| 274 | let forwardref_cls = annotationlib.get_attr("ForwardRef", vm)?; |
| 275 | forwardref_cls.call((arg,), vm) |
| 276 | } |
| 277 | |
| 278 | /// Components for creating a PyUnion after deduplication |
| 279 | struct UnionComponents { |
no test coverage detected