Take advantage of parent's cached_qualname when making mine.
This commit is contained in:
parent
943deb9bf7
commit
23cc769357
1 changed files with 5 additions and 3 deletions
|
@ -1393,9 +1393,11 @@ class Tag(ObjectBase, GroupableMixin):
|
|||
if self._cached_qualified_name:
|
||||
qualname = self._cached_qualified_name
|
||||
else:
|
||||
parent = self.get_parent()
|
||||
if parent is None:
|
||||
qualname = self.name
|
||||
for parent in self.walk_parents():
|
||||
qualname = parent.name + '.' + qualname
|
||||
else:
|
||||
qualname = parent.qualified_name() + '.' + self.name
|
||||
self._cached_qualified_name = qualname
|
||||
|
||||
if max_len is None or len(qualname) <= max_len:
|
||||
|
|
Loading…
Reference in a new issue