77
88import pickle
99from pathlib import Path
10+ from typing import Any
1011from unittest .mock import patch
1112
1213import numpy as np
@@ -339,7 +340,7 @@ def test_to_file_lp_with_negative_zero_coefficients(tmp_path: Path) -> None:
339340 gurobipy .read (str (fn ))
340341
341342
342- def test_format_and_write_streaming_fallback (tmp_path ) :
343+ def test_format_and_write_streaming_fallback (tmp_path : Path ) -> None :
343344 """Test that _format_and_write falls back to eager when streaming fails."""
344345 df = pl .DataFrame ({"a" : ["x" , "y" ], "b" : ["1" , "2" ]})
345346 columns = [pl .col ("a" ), pl .lit (" " ), pl .col ("b" )]
@@ -353,7 +354,7 @@ def test_format_and_write_streaming_fallback(tmp_path):
353354 # Force streaming to fail
354355 original_collect = pl .LazyFrame .collect
355356
356- def failing_collect (self , * args , ** kwargs ) :
357+ def failing_collect (self : pl . LazyFrame , * args : Any , ** kwargs : Any ) -> pl . DataFrame :
357358 if kwargs .get ("engine" ) == "streaming" :
358359 raise RuntimeError ("simulated streaming failure" )
359360 return original_collect (self , * args , ** kwargs )
@@ -367,7 +368,7 @@ def failing_collect(self, *args, **kwargs):
367368 assert content_normal == content_fallback
368369
369370
370- def test_to_file_lp_same_sign_constraints (tmp_path ) :
371+ def test_to_file_lp_same_sign_constraints (tmp_path : Path ) -> None :
371372 """Test LP writing when all constraints have the same sign operator."""
372373 m = Model ()
373374 N = np .arange (5 )
0 commit comments