Skip to content

Commit e42e2ee

Browse files
aaditya-panikNico Cernek
authored and
Nico Cernek
committed
CLN: pandas-dev#28926 Fix mypy errors in pandas/tests/io/parser/conftest.py (pandas-dev#28973)
1 parent be000d2 commit e42e2ee

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

Diff for: pandas/tests/io/parser/conftest.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import os
2+
from typing import List, Optional
23

34
import pytest
45

56
from pandas import read_csv, read_table
67

78

89
class BaseParser:
9-
engine = None
10+
engine = None # type: Optional[str]
1011
low_memory = True
11-
float_precision_choices = []
12+
float_precision_choices = [] # type: List[Optional[str]]
1213

1314
def update_kwargs(self, kwargs):
1415
kwargs = kwargs.copy()
@@ -59,11 +60,11 @@ def csv1(csv_dir_path):
5960

6061
_py_parsers_only = [_pythonParser]
6162
_c_parsers_only = [_cParserHighMemory, _cParserLowMemory]
62-
_all_parsers = _c_parsers_only + _py_parsers_only
63+
_all_parsers = [*_c_parsers_only, *_py_parsers_only]
6364

6465
_py_parser_ids = ["python"]
6566
_c_parser_ids = ["c_high", "c_low"]
66-
_all_parser_ids = _c_parser_ids + _py_parser_ids
67+
_all_parser_ids = [*_c_parser_ids, *_py_parser_ids]
6768

6869

6970
@pytest.fixture(params=_all_parsers, ids=_all_parser_ids)

Diff for: setup.cfg

-3
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,6 @@ ignore_errors=True
205205
[mypy-pandas.tests.io.json.test_ujson]
206206
ignore_errors=True
207207

208-
[mypy-pandas.tests.io.parser.conftest]
209-
ignore_errors=True
210-
211208
[mypy-pandas.tests.io.test_sql]
212209
ignore_errors=True
213210

0 commit comments

Comments
 (0)