[formatter] support filesystem paths for \fM

This commit is contained in:
Mike Fährmann
2023-03-20 22:01:33 +01:00
parent 9789ebac52
commit 1a4d4a799b
3 changed files with 13 additions and 6 deletions

View File

@@ -218,7 +218,7 @@ class ModuleFormatter():
def __init__(self, function_spec, default=NONE, fmt=None):
module_name, _, function_name = function_spec.partition(":")
module = __import__(module_name)
module = util.import_file(module_name)
self.format_map = getattr(module, function_name)