We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8f1694c commit 85c1e2aCopy full SHA for 85c1e2a
tests/test_frame.py
@@ -3561,6 +3561,9 @@ class MyDict(TypedDict):
3561
3562
3563
def test_series_empty_dtype() -> None:
3564
- """Test for the creation of a Series from an empty list GH571."""
3565
- new_tab: Sequence[Never] = []
+ """Test for the creation of a Series from an empty list GH571 to map to a Series[Any]."""
+ new_tab: Sequence[Never] = [] # need to be typehinted to please mypy
3566
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