@@ -332,8 +332,9 @@ def get_model_find_all_references(
332332 # Find the model reference at the cursor position
333333 model_at_position = next (
334334 filter (
335- lambda ref : isinstance (ref , ModelReference )
336- and _position_within_range (position , ref .range ),
335+ lambda ref : (
336+ isinstance (ref , ModelReference ) and _position_within_range (position , ref .range )
337+ ),
337338 get_model_definitions_for_a_path (lint_context , document_uri ),
338339 ),
339340 None ,
@@ -486,8 +487,9 @@ def get_macro_find_all_references(
486487 # Find the macro reference at the cursor position
487488 macro_at_position = next (
488489 filter (
489- lambda ref : isinstance (ref , MacroReference )
490- and _position_within_range (position , ref .range ),
490+ lambda ref : (
491+ isinstance (ref , MacroReference ) and _position_within_range (position , ref .range )
492+ ),
491493 get_macro_definitions_for_a_path (lsp_context , document_uri ),
492494 ),
493495 None ,
@@ -517,9 +519,11 @@ def get_macro_find_all_references(
517519
518520 # Get macro references that point to the same macro definition
519521 matching_refs = filter (
520- lambda ref : isinstance (ref , MacroReference )
521- and ref .path == target_macro_path
522- and ref .target_range == target_macro_target_range ,
522+ lambda ref : (
523+ isinstance (ref , MacroReference )
524+ and ref .path == target_macro_path
525+ and ref .target_range == target_macro_target_range
526+ ),
523527 get_macro_definitions_for_a_path (lsp_context , file_uri ),
524528 )
525529
0 commit comments