Fix return type for dataclass callable type (PY-28442)

This commit is contained in:
Semyon Proshev
2018-05-29 16:50:04 +03:00
parent ecb99048f0
commit e3735015e4
4 changed files with 20 additions and 1 deletions
@@ -0,0 +1,11 @@
from dataclasses import dataclass
@dataclass
class Point:
x: int
y: int
@classmethod
def from_str(cls, string: str) -> 'Point':
return cls(1, 2)
@@ -0,0 +1,3 @@
def dataclass(_cls=None, *, init=True, repr=True, eq=True, order=False,
unsafe_hash=False, frozen=False):
pass