mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user