Skip to content

Commit 97f3b3e

Browse files
mypy fixup
1 parent 2bb80fc commit 97f3b3e

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

pandas/core/groupby/ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ def _cython_operation(
552552
if vdim == 1 and arity == 1:
553553
result = result[:, 0]
554554

555-
names = self._name_functions.get(how, None) # type: Optional[List[str]]
555+
names = self._name_functions.get(how, None)
556556

557557
if swapped:
558558
result = result.swapaxes(0, axis)

pandas/tests/frame/test_dtypes.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import numpy as np
55
import pytest
66

7-
from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype
7+
from pandas.core.dtypes.dtypes import CategoricalDtype, DatetimeTZDtype, IntervalDtype
88

99
import pandas as pd
1010
from pandas import (
@@ -745,14 +745,7 @@ def test_astype_categorical(self, dtype):
745745
expected = DataFrame({k: Categorical(d[k], dtype=dtype) for k in d})
746746
tm.assert_frame_equal(result, expected)
747747

748-
@pytest.mark.parametrize(
749-
"cls",
750-
[
751-
pd.api.types.CategoricalDtype,
752-
pd.api.types.DatetimeTZDtype,
753-
pd.api.types.IntervalDtype,
754-
],
755-
)
748+
@pytest.mark.parametrize("cls", [CategoricalDtype, DatetimeTZDtype, IntervalDtype])
756749
def test_astype_categoricaldtype_class_raises(self, cls):
757750
df = DataFrame({"A": ["a", "a", "b", "c"]})
758751
xpr = "Expected an instance of {}".format(cls.__name__)

0 commit comments

Comments
 (0)