Handled dict and set inside f-string (#4249) (#4563)

This commit is contained in:
Davide Canton 2023-06-09 06:53:13 +02:00 committed by GitHub
parent 2bb32ee943
commit 63fdcea29e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 1380 additions and 207 deletions

View file

@ -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.