mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Remove compatibility aliases (#5464)
* Remove compatibility aliases Remove a few instances of Text Use aliases from _typeshed * Remove unused imports
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import sys
|
||||
from _typeshed import StrPath
|
||||
from http.client import HTTPResponse
|
||||
from os import PathLike
|
||||
from typing import Dict, Iterable, Iterator, Optional, Sequence, Tuple, TypeVar, Union, overload
|
||||
from urllib.request import Request
|
||||
|
||||
@@ -26,7 +26,7 @@ class FileCookieJar(CookieJar):
|
||||
delayload: bool
|
||||
if sys.version_info >= (3, 8):
|
||||
def __init__(
|
||||
self, filename: Optional[Union[str, PathLike[str]]] = ..., delayload: bool = ..., policy: Optional[CookiePolicy] = ...
|
||||
self, filename: Optional[StrPath] = ..., delayload: bool = ..., policy: Optional[CookiePolicy] = ...
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import email.message
|
||||
import socketserver
|
||||
import sys
|
||||
from os import PathLike
|
||||
from _typeshed import StrPath
|
||||
from typing import Any, ClassVar, Dict, List, Mapping, Optional, Sequence, Tuple, Union
|
||||
|
||||
class HTTPServer(socketserver.TCPServer):
|
||||
@@ -57,7 +57,7 @@ class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
|
||||
request: bytes,
|
||||
client_address: Tuple[str, int],
|
||||
server: socketserver.BaseServer,
|
||||
directory: Optional[Union[str, PathLike[str]]] = ...,
|
||||
directory: Optional[StrPath] = ...,
|
||||
) -> None: ...
|
||||
else:
|
||||
def __init__(self, request: bytes, client_address: Tuple[str, int], server: socketserver.BaseServer) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user