@@ -23,7 +23,7 @@ class InvalidPathFinder(QueryFinder):
2323
2424 def __init__ (
2525 self ,
26- message : str = "{{uni.get_text() }}: no such file" ,
26+ message : str = "{{uni.text }}: no such file" ,
2727 severity : DiagnosticSeverity = DiagnosticSeverity .Error ,
2828 ) -> None :
2929 r"""Init.
@@ -52,17 +52,15 @@ def capture2uni(
5252 """
5353 uni = UNI (uri , nodes [0 ])
5454 return (
55- uni
56- if label == "path" and not os .path .isfile (uni .get_path ())
57- else None
55+ uni if label == "path" and not os .path .isfile (uni .path ) else None
5856 )
5957
6058
6159@dataclass
6260class RepeatedTargetFinder (RepeatedFinder ):
6361 r"""Repeatedtargetfinder."""
6462
65- message : str = "{{uni.get_text() }}: is repeated on {{_uni}}"
63+ message : str = "{{uni.text }}: is repeated on {{_uni}}"
6664 severity : DiagnosticSeverity = DiagnosticSeverity .Warning
6765
6866 def __post_init__ (self ) -> None :
@@ -99,7 +97,7 @@ def filter(self, uni: UNI) -> bool:
9997 :rtype: bool
10098 """
10199 if parent := uni .node .parent :
102- text = uni .get_text ()
100+ text = uni .text
103101 return (
104102 uni .node .type == "word"
105103 and parent .type == "targets"
@@ -153,7 +151,7 @@ def is_function_define(self, uni: UNI) -> bool:
153151 return False
154152 return (
155153 parent .type == "define_directive"
156- and uni .get_text () == self .name
154+ and uni .text == self .name
157155 and node == parent .children [1 ]
158156 )
159157
@@ -170,7 +168,7 @@ def is_variable_define(self, uni: UNI) -> bool:
170168 return False
171169 return (
172170 parent .type == "variable_assignment"
173- and uni .get_text () == self .name
171+ and uni .text == self .name
174172 and node == parent .children [0 ]
175173 )
176174
@@ -185,7 +183,7 @@ def is_target_define(self, uni: UNI) -> bool:
185183 parent = node .parent
186184 if parent is None :
187185 return False
188- return parent .type == "targets" and uni .get_text () == self .name
186+ return parent .type == "targets" and uni .text == self .name
189187
190188 def __call__ (self , uni : UNI ) -> bool :
191189 r"""Call.
@@ -271,7 +269,7 @@ def is_variable_reference(self, uni: UNI) -> bool:
271269 if parent is None :
272270 return False
273271 return (
274- uni .get_text () == self .name
272+ uni .text == self .name
275273 and node .type == "word"
276274 and (
277275 parent .type == "variable_reference"
@@ -292,7 +290,7 @@ def is_target_reference(self, uni: UNI) -> bool:
292290 parent = node .parent
293291 if parent is None :
294292 return False
295- return parent .type == "targets" and uni .get_text () == self .name
293+ return parent .type == "targets" and uni .text == self .name
296294
297295 def __call__ (self , uni : UNI ) -> bool :
298296 r"""Call.
0 commit comments