Add stub for pyrfc3339 (#4564)

This commit is contained in:
Vincent Meurisse
2020-11-01 22:19:25 +01:00
committed by GitHub
parent cdc4de1af4
commit 0e002f41ef
4 changed files with 19 additions and 0 deletions

2
third_party/3/pyrfc3339/__init__.pyi vendored Normal file
View File

@@ -0,0 +1,2 @@
from .generator import generate as generate
from .parser import parse as parse

3
third_party/3/pyrfc3339/generator.pyi vendored Normal file
View File

@@ -0,0 +1,3 @@
from datetime import datetime
def generate(dt: datetime, utc: bool = ..., accept_naive: bool = ..., microseconds: bool = ...) -> str: ...

3
third_party/3/pyrfc3339/parser.pyi vendored Normal file
View File

@@ -0,0 +1,3 @@
from datetime import datetime
def parse(timestamp: str, utc: bool = ..., produce_naive: bool = ...) -> datetime: ...

11
third_party/3/pyrfc3339/utils.pyi vendored Normal file
View File

@@ -0,0 +1,11 @@
from datetime import datetime, timedelta, tzinfo
from typing import Optional
class FixedOffset(tzinfo):
def __init__(self, hours: float, minutes: float) -> None: ...
def dst(self, dt: Optional[datetime]) -> timedelta: ...
def utcoffset(self, dt: Optional[datetime]) -> timedelta: ...
def tzname(self, dt: Optional[datetime]) -> str: ...
def timedelta_seconds(td: timedelta) -> int: ...
def timezone(utcoffset: float) -> str: ...