Skip to content

Commit e110ad7

Browse files
samuelsinayokoproost
authored andcommitted
Fix mypy error messages in pandas/test/tseries/offsets/test_offsets.py (pandas-dev#29340)
1 parent 181c8ec commit e110ad7

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

pandas/tests/tseries/offsets/test_offsets.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from datetime import date, datetime, time as dt_time, timedelta
2-
from typing import Type
2+
from typing import Dict, List, Tuple, Type
33

44
import numpy as np
55
import pytest
@@ -31,6 +31,7 @@
3131
import pandas.tseries.offsets as offsets
3232
from pandas.tseries.offsets import (
3333
FY5253,
34+
BaseOffset,
3435
BDay,
3536
BMonthBegin,
3637
BMonthEnd,
@@ -90,6 +91,7 @@ def test_to_M8():
9091
#####
9192
# DateOffset Tests
9293
#####
94+
_ApplyCases = List[Tuple[BaseOffset, Dict[datetime, datetime]]]
9395

9496

9597
class Base:
@@ -741,7 +743,7 @@ def test_onOffset(self):
741743
for offset, d, expected in tests:
742744
assert_onOffset(offset, d, expected)
743745

744-
apply_cases = []
746+
apply_cases = [] # type: _ApplyCases
745747
apply_cases.append(
746748
(
747749
BDay(),
@@ -2629,7 +2631,7 @@ def test_onOffset(self, case):
26292631
offset, d, expected = case
26302632
assert_onOffset(offset, d, expected)
26312633

2632-
apply_cases = []
2634+
apply_cases = [] # type: _ApplyCases
26332635
apply_cases.append(
26342636
(
26352637
CDay(),
@@ -2876,7 +2878,7 @@ def test_onOffset(self, case):
28762878
offset, d, expected = case
28772879
assert_onOffset(offset, d, expected)
28782880

2879-
apply_cases = []
2881+
apply_cases = [] # type: _ApplyCases
28802882
apply_cases.append(
28812883
(
28822884
CBMonthEnd(),
@@ -3025,7 +3027,7 @@ def test_onOffset(self, case):
30253027
offset, dt, expected = case
30263028
assert_onOffset(offset, dt, expected)
30273029

3028-
apply_cases = []
3030+
apply_cases = [] # type: _ApplyCases
30293031
apply_cases.append(
30303032
(
30313033
CBMonthBegin(),

setup.cfg

-3
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,3 @@ ignore_errors=True
156156

157157
[mypy-pandas.tests.series.test_operators]
158158
ignore_errors=True
159-
160-
[mypy-pandas.tests.tseries.offsets.test_offsets]
161-
ignore_errors=True

0 commit comments

Comments
 (0)