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
This commit is contained in:
Sebastian Rittau
2017-10-26 16:54:18 +02:00
committed by Jelle Zijlstra
parent 87ef6b8d53
commit cbea45f19a

View File

@@ -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: ...
```