Skip to content

Commit

Permalink
refactor: Don't try to stubs-merge identical modules
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Dec 2, 2022
1 parent 051e337 commit 7099971
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/griffe/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __setitem__(self, key: str | Sequence[str], value) -> None: # noqa: WPS231
# (implicit support for .pyi modules)
if member.is_module and not (member.is_namespace_package or member.is_namespace_subpackage):
with suppress(AliasResolutionError, CyclicAliasError):
if value.is_module:
if value.is_module and value.filepath != member.filepath:
logger.debug(f"Trying to merge {member.filepath} and {value.filepath}")
with suppress(ValueError):
value = merge_stubs(member, value)
Expand Down

0 comments on commit 7099971

Please sign in to comment.