mirror of
https://github.com/astral-sh/ruff
synced 2026-01-10 16:15:19 -05:00
[tryceratops] Add fix for error-instead-of-exception (TRY400) (#9520)
## Summary add autofix for `error-instead-of-exception` (`TRY400`) ## Test Plan `cargo test`
This commit is contained in:
@@ -64,7 +64,7 @@ pub fn is_logger_candidate(
|
||||
false
|
||||
}
|
||||
|
||||
/// If the keywords to a logging call contain `exc_info=True` or `exc_info=sys.exc_info()`,
|
||||
/// If the keywords to a logging call contain `exc_info=True` or `exc_info=sys.exc_info()`,
|
||||
/// return the `Keyword` for `exc_info`.
|
||||
pub fn exc_info<'a>(arguments: &'a Arguments, semantic: &SemanticModel) -> Option<&'a Keyword> {
|
||||
let exc_info = arguments.find_keyword("exc_info")?;
|
||||
|
||||
Reference in New Issue
Block a user