mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-06 12:14:27 +08:00
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:
committed by
Jelle Zijlstra
parent
87ef6b8d53
commit
cbea45f19a
@@ -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: ...
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user