Return the fully-qualified name of a top-level function.
(obj: Any)
| 304 | |
| 305 | |
| 306 | def get_top_level_function_name(obj: Any) -> str: |
| 307 | """Return the fully-qualified name of a top-level function.""" |
| 308 | assert is_top_level_function(obj) |
| 309 | module = obj.__module__ |
| 310 | if module == '__main__': |
| 311 | module = os.path.splitext(os.path.basename(sys.modules[module].__file__))[0] |
| 312 | return module + "." + obj.__name__ |
| 313 | |
| 314 | |
| 315 | # File system helpers |
nothing calls this directly
no test coverage detected