A character class of a pattern holds a combining mark, which is matched apart from the letter it decorates

tx0/python:regex-combining-mark-in-classrecommendedwarningreliability/strings-and-regexdepth fastbug

What it finds

A letter written with a combining accent, such as e followed by U+0301, is two code points; inside [...] they become two separate members, so the class matches a bare e or a lone accent rather than the accented letter. The precomposed character, or an alternation, says what was meant.

From the rule's source, regex_combining_mark_in_class.rs.

Turn it on, off or suppress it

The rule runs from the recommended tier up. To turn it on in a lower tier, give it a level in tx0.toml:

tx0.toml
[rules]
"tx0/python:regex-combining-mark-in-class" = "warning"

To keep one finding, suppress it with a reason. tx0 suppress ID --reason "..." writes the comment on the line before the code:

# tx0: ignore[tx0/python:regex-combining-mark-in-class] reason="..."

tx0 explain tx0/python:regex-combining-mark-in-class shows the same in the terminal. Found a false positive? Report it.