Resolve frozen module alias to its original name. Returns the original module name if an alias exists, otherwise returns the input name.
(name: &str)
| 2264 | /// Resolve frozen module alias to its original name. |
| 2265 | /// Returns the original module name if an alias exists, otherwise returns the input name. |
| 2266 | pub fn resolve_frozen_alias(name: &str) -> &str { |
| 2267 | match name { |
| 2268 | "_frozen_importlib" => "importlib._bootstrap", |
| 2269 | "_frozen_importlib_external" => "importlib._bootstrap_external", |
| 2270 | "encodings_ascii" => "encodings.ascii", |
| 2271 | "encodings_utf_8" => "encodings.utf_8", |
| 2272 | "__hello_alias__" | "__phello_alias__" | "__phello_alias__.spam" => "__hello__", |
| 2273 | "__phello__.__init__" => "<__phello__", |
| 2274 | "__phello__.ham.__init__" => "<__phello__.ham", |
| 2275 | "__hello_only__" => "", |
| 2276 | _ => name, |
| 2277 | } |
| 2278 | } |
| 2279 | |
| 2280 | #[test] |
| 2281 | fn test_nested_frozen() { |
no outgoing calls
no test coverage detected