-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
The hash of a Style instance depends on _meta and _link:
Lines 432 to 445 in 6d30ad0
| def __hash__(self) -> int: | |
| if self._hash is not None: | |
| return self._hash | |
| self._hash = hash( | |
| ( | |
| self._color, | |
| self._bgcolor, | |
| self._attributes, | |
| self._set_attributes, | |
| self._link, | |
| self._meta, | |
| ) | |
| ) | |
| return self._hash |
So, when the link and meta are cleared with the method Style.clear_meta_and_links, the cached hash should be cleared:
Lines 664 to 668 in 6d30ad0
| style._link = None | |
| style._link_id = "" | |
| style._hash = self._hash | |
| style._null = False | |
| style._meta = None |