File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
crates/red_knot_python_semantic/src Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -364,8 +364,8 @@ impl Default for DataclassParams {
364364 }
365365}
366366
367- impl DataclassParams {
368- fn from_transformer_params ( params : DataclassTransformerParams ) -> Self {
367+ impl From < DataclassTransformerParams > for DataclassParams {
368+ fn from ( params : DataclassTransformerParams ) -> Self {
369369 let mut result = Self :: default ( ) ;
370370
371371 result. set (
Original file line number Diff line number Diff line change @@ -690,8 +690,7 @@ impl<'db> Bindings<'db> {
690690 // the argument type and overwrite the corresponding flag in `dataclass_params` after
691691 // constructing them from the `dataclass_transformer`-parameter defaults.
692692
693- let mut dataclass_params =
694- DataclassParams :: from_transformer_params ( params) ;
693+ let mut dataclass_params = DataclassParams :: from ( params) ;
695694
696695 if let Some ( Some ( Type :: BooleanLiteral ( order) ) ) = callable_signature
697696 . iter ( )
Original file line number Diff line number Diff line change @@ -1780,7 +1780,7 @@ impl<'db> TypeInferenceBuilder<'db> {
17801780
17811781 if let Type :: FunctionLiteral ( f) = decorator_ty {
17821782 if let Some ( params) = f. dataclass_transformer_params ( self . db ( ) ) {
1783- dataclass_params = Some ( DataclassParams :: from_transformer_params ( params) ) ;
1783+ dataclass_params = Some ( params. into ( ) ) ;
17841784 continue ;
17851785 }
17861786 }
You can’t perform that action at this time.
0 commit comments