mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-09 03:01:25 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import sys
|
||||
from typing import Union
|
||||
|
||||
def a2b_uu(__data: Union[str, bytes]) -> bytes: ...
|
||||
def a2b_uu(__data: str | bytes) -> bytes: ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
def b2a_uu(__data: bytes, *, backtick: bool = ...) -> bytes: ...
|
||||
@@ -9,11 +8,11 @@ if sys.version_info >= (3, 7):
|
||||
else:
|
||||
def b2a_uu(__data: bytes) -> bytes: ...
|
||||
|
||||
def a2b_base64(__data: Union[str, bytes]) -> bytes: ...
|
||||
def a2b_base64(__data: str | bytes) -> bytes: ...
|
||||
def b2a_base64(__data: bytes, *, newline: bool = ...) -> bytes: ...
|
||||
def a2b_qp(data: Union[str, bytes], header: bool = ...) -> bytes: ...
|
||||
def a2b_qp(data: str | bytes, header: bool = ...) -> bytes: ...
|
||||
def b2a_qp(data: bytes, quotetabs: bool = ..., istext: bool = ..., header: bool = ...) -> bytes: ...
|
||||
def a2b_hqx(__data: Union[str, bytes]) -> bytes: ...
|
||||
def a2b_hqx(__data: str | bytes) -> bytes: ...
|
||||
def rledecode_hqx(__data: bytes) -> bytes: ...
|
||||
def rlecode_hqx(__data: bytes) -> bytes: ...
|
||||
def b2a_hqx(__data: bytes) -> bytes: ...
|
||||
@@ -22,13 +21,13 @@ def crc32(__data: bytes, __crc: int = ...) -> int: ...
|
||||
def b2a_hex(__data: bytes) -> bytes: ...
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
def hexlify(data: bytes, sep: Union[str, bytes] = ..., bytes_per_sep: int = ...) -> bytes: ...
|
||||
def hexlify(data: bytes, sep: str | bytes = ..., bytes_per_sep: int = ...) -> bytes: ...
|
||||
|
||||
else:
|
||||
def hexlify(__data: bytes) -> bytes: ...
|
||||
|
||||
def a2b_hex(__hexstr: Union[str, bytes]) -> bytes: ...
|
||||
def unhexlify(__hexstr: Union[str, bytes]) -> bytes: ...
|
||||
def a2b_hex(__hexstr: str | bytes) -> bytes: ...
|
||||
def unhexlify(__hexstr: str | bytes) -> bytes: ...
|
||||
|
||||
class Error(ValueError): ...
|
||||
class Incomplete(Exception): ...
|
||||
|
||||
Reference in New Issue
Block a user