mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
cleanup: Use functools.cached_property
This commit is contained in:
parent
3b22dff988
commit
a0e9f647d1
4 changed files with 14 additions and 27 deletions
|
@ -19,10 +19,10 @@
|
|||
|
||||
import typing as T
|
||||
from collections import ChainMap, defaultdict
|
||||
from functools import cached_property
|
||||
|
||||
from .errors import *
|
||||
from .lsp_utils import SemanticToken
|
||||
from .utils import lazy_prop
|
||||
from .xml_emitter import XmlEmitter
|
||||
|
||||
|
||||
|
@ -75,7 +75,7 @@ class AstNode:
|
|||
else:
|
||||
return self.parent.parent_by_type(type)
|
||||
|
||||
@lazy_prop
|
||||
@cached_property
|
||||
def errors(self):
|
||||
return list(self._get_errors())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue