From 5eda646f7bc2fdb112887fdeaa07f8a2f4635c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Mazzucotelli?= Date: Wed, 16 Feb 2022 21:36:14 +0100 Subject: [PATCH] fix: Update target path when changing alias target --- src/griffe/dataclasses.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/griffe/dataclasses.py b/src/griffe/dataclasses.py index 622a431a..72ba2459 100644 --- a/src/griffe/dataclasses.py +++ b/src/griffe/dataclasses.py @@ -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