mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-10 05:39:12 +00:00
parent
2bb32ee943
commit
63fdcea29e
25 changed files with 1380 additions and 207 deletions
|
@ -783,6 +783,7 @@ impl<'a> SemanticModel<'a> {
|
|||
/// Return `true` if the context is in an f-string.
|
||||
pub const fn in_f_string(&self) -> bool {
|
||||
self.flags.contains(SemanticModelFlags::F_STRING)
|
||||
|| self.flags.contains(SemanticModelFlags::NESTED_F_STRING)
|
||||
}
|
||||
|
||||
/// Return `true` if the context is in a nested f-string.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue