Skip to content

Commit

Permalink
Update legacy module load (#57)
Browse files Browse the repository at this point in the history
Co-authored-by: DANIEL YAMAKOV <[email protected]>
  • Loading branch information
yamakov03 and DANIEL YAMAKOV authored Jun 11, 2023
1 parent 810c948 commit 264da1a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lazydocs/generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,8 @@ def generate_docs(
continue

try:
mod = loader.find_module(module_name).load_module(module_name) # type: ignore
mod_spec = loader.find_spec(module_name)
mod = importlib.util.module_from_spec(mod_spec)
module_md = generator.module2md(mod)
if not module_md:
# Module md is empty -> ignore module and all submodules
Expand Down Expand Up @@ -1041,9 +1042,8 @@ def generate_docs(
continue

try:
mod = loader.find_module(module_name).load_module( # type: ignore
module_name
)
mod_spec = loader.find_spec(module_name)
mod = importlib.util.module_from_spec(mod_spec)
module_md = generator.module2md(mod)

if not module_md:
Expand Down

0 comments on commit 264da1a

Please sign in to comment.