Skip to main content

Module query_utils

Module query_utils 

Source

Functionsยง

apply_custom_assertion_fallback
Apply custom assertion pattern fallback to functions with assertion_count == 0. Only functions with no detected assertions are augmented; others are untouched.
collect_mock_class_names
count_captures
count_captures_within_context
Count captures of inner_capture from inner_query that fall within byte ranges of outer_capture from outer_query.
count_custom_assertion_lines
Text-based fallback for T001 escape hatch. Patterns are literal substrings, not regex. Matches in comments, strings, and imports are included by design. Returns the number of source lines that contain any pattern as a substring.
count_duplicate_literals
Count the maximum number of times any non-trivial literal appears within assertion nodes of the given function node.
extract_suppression_from_previous_line
has_any_match