@@ -32,9 +32,7 @@ def test_multi_input_inner_raises_clean_value_error():
3232 "SELECT age / AVG(age) OVER (PARTITION BY city) AS e FROM __THIS__"
3333 ).fit (train )
3434 with pytest .raises (ValueError , match = "one input column" ):
35- SQLTransform (
36- t "SELECT {grouped.transform}(age) AS e2 FROM __THIS__"
37- ).fit (train )
35+ SQLTransform (t "SELECT {grouped.transform}(age) AS e2 FROM __THIS__" ).fit (train )
3836
3937
4038def test_frozen_reference_on_unfit_errors ():
@@ -51,7 +49,9 @@ def test_bare_reference_on_fitted_transform_is_ambiguous_error_via_cascade():
5149 train_v = pa .table ({"v" : [10.0 , 20.0 , 30.0 , 40.0 ]})
5250 train = pa .table ({"age" : [10.0 , 20.0 , 30.0 , 40.0 ]})
5351 b = SQLTransform ("SELECT v * 2 AS d FROM __THIS__" ).fit (train_v )
54- a = SQLTransform ("SELECT (v - AVG(v) OVER ()) / STDDEV(v) OVER () AS s FROM __THIS__" )
52+ a = SQLTransform (
53+ "SELECT (v - AVG(v) OVER ()) / STDDEV(v) OVER () AS s FROM __THIS__"
54+ )
5555 with pytest .raises (ValueError , match = "already fitted" ):
5656 SQLTransform (t "SELECT {a}({b}(age)) AS z FROM __THIS__" ).fit (train )
5757
@@ -62,7 +62,9 @@ def test_frozen_reference_on_unfit_errors_via_cascade():
6262 # path too.
6363 train = pa .table ({"age" : [10.0 , 20.0 , 30.0 , 40.0 ]})
6464 b = SQLTransform ("SELECT v * 2 AS d FROM __THIS__" ) # unfit
65- a = SQLTransform ("SELECT (v - AVG(v) OVER ()) / STDDEV(v) OVER () AS s FROM __THIS__" )
65+ a = SQLTransform (
66+ "SELECT (v - AVG(v) OVER ()) / STDDEV(v) OVER () AS s FROM __THIS__"
67+ )
6668 with pytest .raises (ValueError , match = "not fitted" ):
6769 SQLTransform (t "SELECT {a}({b.transform}(age)) AS z FROM __THIS__" ).fit (train )
6870
@@ -94,9 +96,9 @@ def test_reference_not_applied_to_column_errors():
9496 "SELECT (age - AVG(age) OVER ()) / STDDEV(age) OVER () AS s FROM __THIS__"
9597 ).fit (train )
9698 with pytest .raises (ValueError , match = "single input column" ):
97- SQLTransform (
98- t "SELECT {scaler.transform}(age + 1) AS s FROM __THIS__"
99- ). fit ( train )
99+ SQLTransform (t "SELECT {scaler.transform}(age + 1) AS s FROM __THIS__" ). fit (
100+ train
101+ )
100102
101103
102104def test_non_transform_interpolation_errors ():
0 commit comments