@@ -709,16 +709,20 @@ def test_types_read_csv() -> None:
709
709
pd .read_csv (path , names = "abcd" ) # type: ignore[call-overload] # pyright: ignore[reportArgumentType]
710
710
pd .read_csv (path , usecols = "abcd" ) # type: ignore[call-overload] # pyright: ignore[reportArgumentType]
711
711
712
- tfr1 : TextFileReader = pd .read_csv (path , nrows = 2 , iterator = True , chunksize = 3 )
712
+ tfr1 = pd .read_csv (path , nrows = 2 , iterator = True , chunksize = 3 )
713
+ check (assert_type (tfr1 , TextFileReader ), TextFileReader )
713
714
tfr1 .close ()
714
715
715
- tfr2 : TextFileReader = pd .read_csv (path , nrows = 2 , chunksize = 1 )
716
+ tfr2 = pd .read_csv (path , nrows = 2 , chunksize = 1 )
717
+ check (assert_type (tfr2 , TextFileReader ), TextFileReader )
716
718
tfr2 .close ()
717
719
718
- tfr3 : TextFileReader = pd .read_csv (path , nrows = 2 , iterator = False , chunksize = 1 )
720
+ tfr3 = pd .read_csv (path , nrows = 2 , iterator = False , chunksize = 1 )
721
+ check (assert_type (tfr3 , TextFileReader ), TextFileReader )
719
722
tfr3 .close ()
720
723
721
- tfr4 : TextFileReader = pd .read_csv (path , nrows = 2 , iterator = True )
724
+ tfr4 = pd .read_csv (path , nrows = 2 , iterator = True )
725
+ check (assert_type (tfr4 , TextFileReader ), TextFileReader )
722
726
tfr4 .close ()
723
727
724
728
df_dates = pd .DataFrame (data = {"col1" : ["2023-03-15" , "2023-04-20" ]})
@@ -920,7 +924,6 @@ def test_text_file_reader():
920
924
921
925
922
926
def test_to_csv_series ():
923
- s : Series
924
927
s = DF .iloc [:, 0 ]
925
928
check (assert_type (s .to_csv (), str ), str )
926
929
with ensure_clean () as path :
0 commit comments