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

Method from_attribute

crates/ruff_python_stdlib/src/logging.rs:13–24  ·  view source on GitHub ↗
(level: &str)

Source from the content-addressed store, hash-verified

11
12impl LoggingLevel {
13 pub fn from_attribute(level: &str) -> Option<Self> {
14 match level {
15 "debug" => Some(LoggingLevel::Debug),
16 "critical" => Some(LoggingLevel::Critical),
17 "error" => Some(LoggingLevel::Error),
18 "exception" => Some(LoggingLevel::Exception),
19 "info" => Some(LoggingLevel::Info),
20 "warn" => Some(LoggingLevel::Warn),
21 "warning" => Some(LoggingLevel::Warning),
22 _ => None,
23 }
24 }
25}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected