dj_angles.quote_utils

Shared utilities for tracking quote state during string parsing.

Module Contents

class dj_angles.quote_utils.QuoteTracker

Tracks whether we’re inside single or double quotes during character-by-character parsing.

QUOTE_CHARS = ("'", '"')
in_single_quote = False
in_double_quote = False
static is_quote_char(char: str) bool

Return True if the character is a quote character.

update(char: str) None

Update quote state based on the current character.

property inside_quotes: bool

Return True if currently inside any type of quote.

reset() None

Reset the quote state.