From cbea45f19acc42c522c5b8bd7ce975a7a571a1c4 Mon Sep 17 00:00:00 2001 From: Sebastian Rittau Date: Thu, 26 Oct 2017 16:54:18 +0200 Subject: [PATCH] Fix style example (#1689) * Replace `self` with `cls` in classmethod * Group classmethods together, as in the actual stub * Use float instead of Union[int, float] in coding style example --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8fc017af2..6558b0426 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,12 @@ MINYEAR = ... # type: int class date(object): def __init__(self, year: int, month: int, day: int) -> None: ... @classmethod - def fromtimestamp(cls, timestamp: Union[int, float]) -> date: ... + def fromtimestamp(cls, timestamp: float) -> date: ... + @classmethod + def today(cls) -> date: ... @classmethod def fromordinal(cls, ordinal: int) -> date: ... def replace(self, year: int = ..., month: int = ..., day: int = ...) -> date: ... - @classmethod - def today(self) -> date: ... def ctime(self) -> str: ... def weekday(self) -> int: ... ```