mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-15 08:00:46 +00:00
Avoid parsing f-strings in type annotations (#3699)
This commit is contained in:
parent
ba43d6bd0b
commit
028329854b
7 changed files with 38 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue