mirror of
https://gitlab.gnome.org/jwestman/blueprint-compiler.git
synced 2025-05-04 15:59:08 -04:00
Use cached_property instead of a custom decorator
This commit is contained in:
parent
1c1a5e3266
commit
f197e68589
4 changed files with 15 additions and 28 deletions
|
@ -17,12 +17,12 @@
|
|||
#
|
||||
# SPDX-License-Identifier: LGPL-3.0-or-later
|
||||
|
||||
import typing as T
|
||||
from collections import ChainMap, defaultdict
|
||||
from functools import cached_property
|
||||
import typing as T
|
||||
|
||||
from .errors import *
|
||||
from .lsp_utils import SemanticToken
|
||||
from .utils import lazy_prop
|
||||
from .xml_emitter import XmlEmitter
|
||||
|
||||
|
||||
|
@ -71,7 +71,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