@@ -28,9 +28,9 @@ use ruff_python_ast::DictItem;
2828use ruff_python_ast:: Expr ;
2929use ruff_python_ast:: ExprCall ;
3030use ruff_python_ast:: ExprGenerator ;
31- use ruff_python_ast:: ExprName ;
3231use ruff_python_ast:: ExprLambda ;
3332use ruff_python_ast:: ExprList ;
33+ use ruff_python_ast:: ExprName ;
3434use ruff_python_ast:: ExprNumberLiteral ;
3535use ruff_python_ast:: ExprStarred ;
3636use ruff_python_ast:: ExprStringLiteral ;
@@ -51,7 +51,6 @@ use crate::alt::callable::CallArg;
5151use crate :: alt:: solve:: TypeFormContext ;
5252use crate :: alt:: unwrap:: Hint ;
5353use crate :: alt:: unwrap:: HintRef ;
54- use crate :: graph:: index:: Idx ;
5554use crate :: binding:: binding:: Binding ;
5655use crate :: binding:: binding:: Key ;
5756use crate :: binding:: binding:: KeyYield ;
@@ -61,6 +60,7 @@ use crate::error::collector::ErrorCollector;
6160use crate :: error:: context:: ErrorContext ;
6261use crate :: error:: context:: ErrorInfo ;
6362use crate :: error:: context:: TypeCheckContext ;
63+ use crate :: graph:: index:: Idx ;
6464use crate :: types:: callable:: Callable ;
6565use crate :: types:: callable:: Param ;
6666use crate :: types:: callable:: ParamList ;
@@ -330,8 +330,8 @@ impl<'a, Ans: LookupAnswer> AnswersSolver<'a, Ans> {
330330 . hint_from_type ( branch. clone ( ) , hint. errors ( ) )
331331 . with_source_branches ( hint. source_branches ( ) ) ;
332332 let branch_errors = self . error_collector ( ) ;
333- let info = self
334- . expr_infer_type_info_with_hint ( x, Some ( branch_hint. as_ref ( ) ) , & branch_errors) ;
333+ let info =
334+ self . expr_infer_type_info_with_hint ( x, Some ( branch_hint. as_ref ( ) ) , & branch_errors) ;
335335 if branch_errors. is_empty ( ) && self . is_subset_eq ( info. ty ( ) , branch) {
336336 errors. extend ( branch_errors) ;
337337 return info;
@@ -1141,7 +1141,12 @@ impl<'a, Ans: LookupAnswer> AnswersSolver<'a, Ans> {
11411141 let param_vars: Vec < ( Name , Var ) > = if let Some ( parameters) = & lambda. parameters {
11421142 parameters
11431143 . iter_non_variadic_params ( )
1144- . map ( |x| ( x. name ( ) . id . clone ( ) , self . bindings ( ) . get_lambda_param ( x. name ( ) ) ) )
1144+ . map ( |x| {
1145+ (
1146+ x. name ( ) . id . clone ( ) ,
1147+ self . bindings ( ) . get_lambda_param ( x. name ( ) ) ,
1148+ )
1149+ } )
11451150 . collect ( )
11461151 } else {
11471152 Vec :: new ( )
0 commit comments