mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-16 16:40:19 +00:00
Add in_boolean_test
to Context
(#4072)
This commit is contained in:
parent
df77595426
commit
5e91211e6d
3 changed files with 54 additions and 2 deletions
|
@ -10,6 +10,7 @@ use crate::context::Context;
|
|||
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum Callable {
|
||||
Bool,
|
||||
Cast,
|
||||
NewType,
|
||||
TypeVar,
|
||||
|
|
|
@ -48,6 +48,7 @@ pub struct Context<'a> {
|
|||
pub in_deferred_type_definition: bool,
|
||||
pub in_exception_handler: bool,
|
||||
pub in_f_string: bool,
|
||||
pub in_boolean_test: bool,
|
||||
pub in_literal: bool,
|
||||
pub in_subscript: bool,
|
||||
pub in_type_checking_block: bool,
|
||||
|
@ -88,6 +89,7 @@ impl<'a> Context<'a> {
|
|||
in_deferred_type_definition: false,
|
||||
in_exception_handler: false,
|
||||
in_f_string: false,
|
||||
in_boolean_test: false,
|
||||
in_literal: false,
|
||||
in_subscript: false,
|
||||
in_type_checking_block: false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue