Skip to content

Commit

Permalink
refactor: Use relative filepath in docstring warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Nov 13, 2021
1 parent ae236e1 commit e894df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/griffe/docstrings/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def warn(docstring: Docstring, offset: int, message: str) -> None: # noqa: WPS4
message: The message to log.
"""
try:
prefix = docstring.parent.filepath # type: ignore
prefix = docstring.parent.relative_filepath # type: ignore
except AttributeError:
prefix = "<module>"
logger.warning(f"{prefix}:{docstring.lineno+offset}: {message}") # type: ignore
Expand Down

0 comments on commit e894df7

Please sign in to comment.