cleanup: Use functools.cached_property

This commit is contained in:
James Westman 2022-02-23 15:39:15 -06:00
parent 3b22dff988
commit a0e9f647d1
4 changed files with 14 additions and 27 deletions

View file

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