Use cached_property instead of a custom decorator

This commit is contained in:
James Westman 2022-03-16 16:06:00 -05:00
parent 1c1a5e3266
commit f197e68589
4 changed files with 15 additions and 28 deletions

View file

@ -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())