I know this was the existing code, but this can probably directly be called where its used (or using a helper function so that it is bound to the function during runtime rather than executed on import)
e.g.
# global default
DEFAULT_EXTENSION = ".nc"
def some_fn(..., ext=None):
if ext is None:
# if ext is not explicitly specified, try get from config, otherwise default to global
xxx.config.get("xxx.default_extension", DEFAULT_EXTENSION)
... # usual execution flow
Originally posted by @nikeethr in #68 (comment)