File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ def _process_constraints(
110
110
111
111
# Apply arity-specific validation for existing constraints
112
112
if isinstance (constraints [op ], tuple ):
113
- constraint_tuple : tuple [int , ...] = constraints [op ]
113
+ constraint_tuple = cast ( Tuple [int , ...], constraints [op ])
114
114
# Validate that constraint tuple length matches operator arity
115
115
if len (constraint_tuple ) != arity :
116
116
raise ValueError (
Original file line number Diff line number Diff line change @@ -1294,7 +1294,7 @@ def test_deprecated_functions(self):
1294
1294
def test_power_law_warning (self ):
1295
1295
"""Ensure that a warning is given for a power law operator."""
1296
1296
with self .assertWarns (UserWarning ):
1297
- _process_constraints (["^" ], [] , {})
1297
+ _process_constraints ({ 2 : ["^" ]} , {})
1298
1298
1299
1299
def test_size_warning (self ):
1300
1300
"""Ensure that a warning is given for a large input size."""
@@ -1420,7 +1420,7 @@ def test_suggest_keywords(self):
1420
1420
1421
1421
# Farther matches (this might need to be changed)
1422
1422
with self .assertRaises (TypeError ) as cm :
1423
- PySRRegressor (operators = ["+" , "-" ])
1423
+ PySRRegressor (nary_operators = ["+" , "-" ])
1424
1424
1425
1425
self .assertIn ("`unary_operators`, `binary_operators`" , str (cm .exception ))
1426
1426
You can’t perform that action at this time.
0 commit comments