Skip to content

Commit 09b5372

Browse files
authored
Reader type annotation (dfurtado#49)
The arguments *args and **kwargs had the wrong type annotation. Both should be annotated with Any.
1 parent 5f709c1 commit 09b5372

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

dataclass_csv/dataclass_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ def __init__(
5454
restkey: Optional[str] = None,
5555
restval: Optional[Any] = None,
5656
dialect: str = "excel",
57-
*args: List[Any],
58-
**kwds: Dict[str, Any],
57+
*args: Any,
58+
**kwds: Any,
5959
):
6060

6161
if not f:

dataclass_csv/dataclass_reader.pyi

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
from .exceptions import CsvValueError as CsvValueError
21
from .field_mapper import FieldMapper as FieldMapper
3-
from typing import Any, Dict, List, Optional, Sequence, Type
2+
from typing import Any, Optional, Sequence, Type
43

54
class DataclassReader:
65
def __init__(
@@ -11,9 +10,9 @@ class DataclassReader:
1110
restkey: Optional[str] = ...,
1211
restval: Optional[Any] = ...,
1312
dialect: str = ...,
14-
*args: List[Any],
15-
**kwds: Dict[str, Any],
13+
*args: Any,
14+
**kwds: Any
1615
) -> None: ...
17-
def __next__(self): ...
16+
def __next__(self) -> None: ...
1817
def __iter__(self) -> Any: ...
1918
def map(self, csv_fieldname: str) -> FieldMapper: ...

0 commit comments

Comments
 (0)