MCPcopy Create free account
hub / github.com/astral-sh/ruff / is_python_identifier_continue

Function is_python_identifier_continue

crates/ruff_python_ast/src/identifier.rs:143–145  ·  view source on GitHub ↗

Return `true` if the given character is a valid Python identifier continuation character. Python identifiers can contain alphanumeric characters and underscores, but cannot start with a number.

(c: char)

Source from the content-addressed store, hash-verified

141/// Python identifiers can contain alphanumeric characters and underscores, but cannot start with a
142/// number.
143fn is_python_identifier_continue(c: char) -> bool {
144 c.is_alphanumeric() || c == '_'
145}
146
147/// Simple zero allocation tokenizer for Python identifiers.
148///

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected