File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -1006,13 +1006,12 @@ def check_expr(expr: Expression) -> None:
1006
1006
and len (expr .value ) != 1
1007
1007
):
1008
1008
self .msg .requires_int_or_single_byte (context )
1009
- else :
1010
- if isinstance (folded := constant_fold_expr (expr , "<unused>" ), str ):
1011
- if len (folded ) != 1 :
1012
- self .msg .requires_int_or_char (context )
1013
- elif isinstance (expr , BytesExpr ):
1014
- if len (expr .value ) != 1 :
1015
- self .msg .requires_int_or_char (context )
1009
+ elif isinstance (folded := constant_fold_expr (expr , "<unused>" ), str ):
1010
+ if len (folded ) != 1 :
1011
+ self .msg .requires_int_or_char (context )
1012
+ elif isinstance (expr , BytesExpr ):
1013
+ if len (expr .value ) != 1 :
1014
+ self .msg .requires_int_or_char (context )
1016
1015
1017
1016
return check_expr , check_type
1018
1017
You can’t perform that action at this time.
0 commit comments