mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-06 16:40:39 +00:00
[red-knot] Diagnostics for incorrect bool
usages (#16238)
This commit is contained in:
parent
3aa7ba31b1
commit
5fab97f1ef
28 changed files with 1267 additions and 260 deletions
|
@ -595,6 +595,10 @@ impl<'s> Parser<'s> {
|
|||
return self.process_config_block(code);
|
||||
}
|
||||
|
||||
if lang == "ignore" {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if let Some(explicit_path) = self.explicit_path {
|
||||
if !lang.is_empty()
|
||||
&& lang != "text"
|
||||
|
@ -618,7 +622,7 @@ impl<'s> Parser<'s> {
|
|||
EmbeddedFilePath::Explicit(path)
|
||||
}
|
||||
None => match lang {
|
||||
"py" => EmbeddedFilePath::Autogenerated(PySourceType::Python),
|
||||
"py" | "python" => EmbeddedFilePath::Autogenerated(PySourceType::Python),
|
||||
"pyi" => EmbeddedFilePath::Autogenerated(PySourceType::Stub),
|
||||
"" => {
|
||||
bail!("Cannot auto-generate file name for code block with empty language specifier in test `{test_name}`");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue