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

Function strip_underscores

crates/ruff_python_parser/src/parser/mod.rs:899–905  ·  view source on GitHub ↗
(text: &str)

Source from the content-addressed store, hash-verified

897}
898
899fn strip_underscores(text: &str) -> Cow<'_, str> {
900 if text.as_bytes().contains(&b'_') {
901 Cow::Owned(text.chars().filter(|&c| c != '_').collect())
902 } else {
903 Cow::Borrowed(text)
904 }
905}
906
907#[cold]
908fn normalize_name(text: &str) -> Name {

Callers 3

bump_intMethod · 0.85
bump_floatMethod · 0.85
bump_complexMethod · 0.85

Calls 5

containsMethod · 0.45
as_bytesMethod · 0.45
collectMethod · 0.45
filterMethod · 0.45
charsMethod · 0.45

Tested by

no test coverage detected