Skip to content

Commit

Permalink
Fix duplicated warnings issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tristanlatr committed Mar 2, 2024
1 parent 1dad5f6 commit a30353e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pydoctor/linker.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ def _resolve_identifier_xref(self,
invname: Optional[str] = None,
domain: Optional[str] = None,
reftype: Optional[str] = None,
external: bool = False
external: bool = False,
no_warnings: bool = False,
) -> Union[str, 'model.Documentable']:
"""
Resolve a crossreference link to a Python identifier.
Expand Down Expand Up @@ -307,12 +308,13 @@ def _resolve_identifier_xref(self,
try:
return self._resolve_identifier_xref(_SPACE_RE.sub('', identifier),
lineno, invname=invname, domain=domain,
reftype=reftype, external=external)
reftype=reftype, external=external, no_warnings=True)
except LookupError:
pass

if self.reporting_obj:
if self.reporting_obj and no_warnings is False:
self.reporting_obj.report(message, 'resolve_identifier_xref', lineno)

raise LookupError(identifier)


Expand Down

0 comments on commit a30353e

Please sign in to comment.