Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -1,5 +1,5 @@
import sys
from typing import Iterable, List, NamedTuple, Optional
from typing import Iterable, List, NamedTuple
class _RequestRate(NamedTuple):
requests: int
@@ -13,7 +13,7 @@ class RobotFileParser:
def can_fetch(self, useragent: str, url: str) -> bool: ...
def mtime(self) -> int: ...
def modified(self) -> None: ...
def crawl_delay(self, useragent: str) -> Optional[str]: ...
def request_rate(self, useragent: str) -> Optional[_RequestRate]: ...
def crawl_delay(self, useragent: str) -> str | None: ...
def request_rate(self, useragent: str) -> _RequestRate | None: ...
if sys.version_info >= (3, 8):
def site_maps(self) -> Optional[List[str]]: ...
def site_maps(self) -> List[str] | None: ...