Skip to content

Commit 799e8f0

Browse files
GH1034 PR Feedback
1 parent 2f92df9 commit 799e8f0

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/test_io.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -709,16 +709,20 @@ def test_types_read_csv() -> None:
709709
pd.read_csv(path, names="abcd") # type: ignore[call-overload] # pyright: ignore[reportArgumentType]
710710
pd.read_csv(path, usecols="abcd") # type: ignore[call-overload] # pyright: ignore[reportArgumentType]
711711

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)
713714
tfr1.close()
714715

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)
716718
tfr2.close()
717719

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)
719722
tfr3.close()
720723

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)
722726
tfr4.close()
723727

724728
df_dates = pd.DataFrame(data={"col1": ["2023-03-15", "2023-04-20"]})
@@ -920,7 +924,6 @@ def test_text_file_reader():
920924

921925

922926
def test_to_csv_series():
923-
s: Series
924927
s = DF.iloc[:, 0]
925928
check(assert_type(s.to_csv(), str), str)
926929
with ensure_clean() as path:

0 commit comments

Comments
 (0)