Skip to content

Commit ae4fd06

Browse files
authored
Merge pull request #278 from konradhalas/bug/data-type-definition
Fix class Data(Protocol) types declaration
2 parents 6e7f676 + c2a024e commit ae4fd06

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

dacite/data.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
try:
2-
from typing import Protocol # type: ignore
2+
from typing import Protocol, Any # type: ignore
33
except ImportError:
4-
from typing_extensions import Protocol # type: ignore
4+
from typing_extensions import Protocol, Any # type: ignore
55

66

77
# fmt: off
88
class Data(Protocol):
9-
def keys(self): ...
10-
11-
def __getitem__(self, item): ...
12-
13-
def __contains__(self, item): ...
9+
def keys(self) -> Any: ...
10+
def __getitem__(self, *args, **kwargs) -> Any: ...
11+
def __contains__(self, *args, **kwargs) -> bool: ...
1412
# fmt: on

0 commit comments

Comments
 (0)