Skip to content

Commit 85c1e2a

Browse files
GH571 PR feedback
1 parent 8f1694c commit 85c1e2a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_frame.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3561,6 +3561,9 @@ class MyDict(TypedDict):
35613561

35623562

35633563
def test_series_empty_dtype() -> None:
3564-
"""Test for the creation of a Series from an empty list GH571."""
3565-
new_tab: Sequence[Never] = []
3564+
"""Test for the creation of a Series from an empty list GH571 to map to a Series[Any]."""
3565+
new_tab: Sequence[Never] = [] # need to be typehinted to please mypy
35663566
check(assert_type(pd.Series(new_tab), "pd.Series[Any]"), pd.Series)
3567+
check(assert_type(pd.Series([]), "pd.Series[Any]"), pd.Series)
3568+
# ensure that an empty string does not get matched to Sequence[Never]
3569+
check(assert_type(pd.Series(""), "pd.Series[str]"), pd.Series)

0 commit comments

Comments
 (0)