mirror of https://github.com/astral-sh/ruff
Start with Upper case in error messages (#5045)
## Summary To be consistent with the format used by other errors. ## Test Plan N/A.
This commit is contained in:
parent
95ee6dcb3b
commit
e1fd3965a2
|
|
@ -231,11 +231,11 @@ impl Display for DisplayParseErrorType<'_> {
|
||||||
if let Some(expected) = expected.as_ref() {
|
if let Some(expected) = expected.as_ref() {
|
||||||
write!(
|
write!(
|
||||||
f,
|
f,
|
||||||
"expected '{expected}', but got {tok}",
|
"Expected '{expected}', but got {tok}",
|
||||||
tok = TruncateAtNewline(&tok)
|
tok = TruncateAtNewline(&tok)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
write!(f, "unexpected token {tok}", tok = TruncateAtNewline(&tok))
|
write!(f, "Unexpected token {tok}", tok = TruncateAtNewline(&tok))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ParseErrorType::Lexical(ref error) => write!(f, "{error}"),
|
ParseErrorType::Lexical(ref error) => write!(f, "{error}"),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue