look for packages starting with 'invest' with or without dash or underscore

This commit is contained in:
Emily Soth 2025-05-09 12:44:11 -07:00
parent 20548a8294
commit ddc5466f85
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ for _, _name, _ispkg in pkgutil.iter_modules(natcap.invest.__path__):
# discover plugins: identify packages whose name starts with invest-
# and meet the basic API criteria for an invest plugin
for _, _name, _ispkg in pkgutil.iter_modules():
if _name.startswith('invest-'):
if _name.startswith('invest'):
_module = importlib.import_module(_name)
if is_invest_compliant_model(_module):
pyname_to_module[_name] = _module