Skip to content

Commit

Permalink
fix: Update target path when changing alias target
Browse files Browse the repository at this point in the history
  • Loading branch information
pawamoy committed Feb 16, 2022
1 parent 69500dd commit 5eda646
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/griffe/dataclasses.py
Original file line number Diff line number Diff line change
Expand Up @@ -871,6 +871,7 @@ def target(self, value: Object | Alias) -> None:
if value is self:
raise CyclicAliasError([self.target_path])
self._target = value
self.target_path = value.path
if self.parent is not None:
self._target.aliases[self.path] = self

Expand Down

0 comments on commit 5eda646

Please # to comment.