click.echo message arg type to follow click's documentation (#1698)

str is not unicode on Python 2 while Text is a proper alias for unicode on python 2 and str on python 3

closes #1691
This commit is contained in:
Grzegorz Śliwiński
2017-11-09 04:41:36 +01:00
committed by Jelle Zijlstra
parent 44f7869c80
commit 9439ec4e4f

View File

@@ -1,5 +1,4 @@
from typing import Any, Callable, Iterator, IO, List, Optional, TypeVar, Union
from typing import Any, Callable, Iterator, IO, List, Optional, TypeVar, Union, Text
_T = TypeVar('_T')
_Decorator = Callable[[_T], _T]
@@ -74,7 +73,7 @@ class KeepOpenFile:
def echo(
message: Optional[str] = None,
message: Optional[Union[bytes, Text]] = None,
file: Optional[IO] = None,
nl: bool = True,
err: bool = False,