[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
5a085ed4cd
commit
dda712c4ff
|
@ -623,7 +623,7 @@ def insert_missing_modules(modules: Dict[str, ModuleType], module_name: str) ->
|
|||
# doc="Empty module created by pytest's importmode=importlib.",
|
||||
# )
|
||||
# modules[module_name] = module
|
||||
|
||||
|
||||
# Instead of raising ModuleNotFoundError, replace with dummy directly.
|
||||
if not sys.meta_path:
|
||||
module = ModuleType(
|
||||
|
@ -631,11 +631,9 @@ def insert_missing_modules(modules: Dict[str, ModuleType], module_name: str) ->
|
|||
doc="Empty module created by pytest's importmode=importlib.",
|
||||
)
|
||||
modules[module_name] = module
|
||||
else:
|
||||
else:
|
||||
importlib.import_module(module_name)
|
||||
|
||||
|
||||
|
||||
|
||||
module_parts.pop(-1)
|
||||
module_name = ".".join(module_parts)
|
||||
|
||||
|
|
Loading…
Reference in New Issue