Skip to content

Commit

Permalink
fix: Fix relative paths for old versions when checking API
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Jul 7, 2023
1 parent 7302f17 commit 96fd45b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/griffe/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _location(self) -> Path:
parts = self._relative_filepath.parts
for index, part in enumerate(parts):
if part.startswith(WORKTREE_PREFIX):
return Path(*parts[index + 3 :])
return Path(*parts[index + 2 :])
return self._relative_filepath

@property
Expand Down

0 comments on commit 96fd45b

Please sign in to comment.