typeshedPython 的 library stub 的集合
typeshed 是 Python 的 library stub 的集合,用于为Python标准库和Python内建,以及第三方软件包。此数据可用于静态分析,类型检查和类型推断。
语法示例
MAXYEAR = ... # type: int MINYEAR = ... # type: int __doc__ = ... # type: str __file__ = ... # type: str __name__ = ... # type: str __package__ = ... # type: None class date(object): def __init__(self, year: int, month: int, day: int): ... @classmethod def fromtimestamp(cls, timestamp: int or float) -> date: ... @classmethod def fromordinal(cls, ordinal: int) -> date: ... @classmethod def today(self) -> date: ... def ctime(self) -> str: ... def weekday(self) -> int: ...
评论