mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
17 lines
514 B
Python
17 lines
514 B
Python
import sys
|
|
from typing import BinaryIO, Union
|
|
|
|
_File = Union[str, BinaryIO]
|
|
|
|
class Error(Exception): ...
|
|
|
|
if sys.version_info >= (3, 7):
|
|
def encode(
|
|
in_file: _File, out_file: _File, name: str | None = ..., mode: int | None = ..., *, backtick: bool = ...
|
|
) -> None: ...
|
|
|
|
else:
|
|
def encode(in_file: _File, out_file: _File, name: str | None = ..., mode: int | None = ...) -> None: ...
|
|
|
|
def decode(in_file: _File, out_file: _File | None = ..., mode: int | None = ..., quiet: int = ...) -> None: ...
|