Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

Commit

Permalink
Updated stub
Browse files Browse the repository at this point in the history
  • Loading branch information
nihaals committed Jun 4, 2020
1 parent 345a0a3 commit 5c751a8
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions pecho/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,44 @@ from typing import Any, Callable, Dict, List, Optional, Protocol, TextIO, TypeVa

__all__: List[str]

if sys.version_info >= (3, 8):
__version__: str
try:
import importlib.metadata
except ImportError:
__version__: None
else:
__version__ = None
__version__: str

PrintFuncArg = TypeVar('PrintFuncArg')
PrintFuncReturn = TypeVar('PrintFuncReturn')
_PrintFuncArg = TypeVar('_PrintFuncArg')
_PrintFuncReturn = TypeVar('_PrintFuncReturn')

class PrintFuncText(Protocol):
def __call__(self, __text: PrintFuncArg, *__args: Any, **__kwargs: Any) -> PrintFuncReturn: ...
def __call__(self, __text: _PrintFuncArg, *__args: Any, **__kwargs: Any) -> _PrintFuncReturn: ...

class PrintFuncObjects(Protocol):
def __call__(self, *__objects: PrintFuncArg, **__kwargs: Any) -> PrintFuncReturn: ...
def __call__(self, *__objects: _PrintFuncArg, **__kwargs: Any) -> _PrintFuncReturn: ...

@overload
def echo(
__text: PrintFuncArg,
__text: _PrintFuncArg,
newline: bool = ...,
newline_char: str = ...,
end: str = ...,
print_func: PrintFuncText = ...,
print_func_kwargs: Dict[str, Any] = ...,
) -> PrintFuncReturn: ...
) -> _PrintFuncReturn: ...
@overload
def echo(
*objects: PrintFuncArg,
*objects: _PrintFuncArg,
newline: bool = ...,
newline_char: str = ...,
end: str = ...,
print_func_kwargs: Dict[str, Any] = ...,
) -> PrintFuncReturn: ...
) -> _PrintFuncReturn: ...
def echo(
*objects: PrintFuncArg,
*objects: _PrintFuncArg,
newline: bool = ...,
newline_char: str = ...,
end: str = ...,
print_func: PrintFuncObjects = ...,
print_func_kwargs: Dict[str, Any] = ...,
) -> PrintFuncReturn: ...
) -> _PrintFuncReturn: ...

0 comments on commit 5c751a8

Please sign in to comment.