Avoid parsing f-strings in type annotations (#3699)

This commit is contained in:
Charlie Marsh 2023-03-23 18:51:44 -04:00 committed by GitHub
parent ba43d6bd0b
commit 028329854b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 38 additions and 2 deletions

View file

@ -45,6 +45,7 @@ pub struct Context<'a> {
pub in_deferred_string_type_definition: Option<AnnotationKind>,
pub in_deferred_type_definition: bool,
pub in_exception_handler: bool,
pub in_f_string: bool,
pub in_literal: bool,
pub in_subscript: bool,
pub in_type_checking_block: bool,
@ -83,6 +84,7 @@ impl<'a> Context<'a> {
in_deferred_string_type_definition: None,
in_deferred_type_definition: false,
in_exception_handler: false,
in_f_string: false,
in_literal: false,
in_subscript: false,
in_type_checking_block: false,