diff --git a/CHANGES.rst b/CHANGES.rst index 6c9a79327..d02c3e952 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -14,7 +14,8 @@ Unreleased - Fix a typo in the Bash completion script that affected file and directory completion. If this script was generated by a previous version, it should be regenerated. :issue:`2163` -- Fix typing for ``secho`` file argument. :issue:`2174` +- Fix typing for ``echo`` and ``secho`` file argument. + :issue:`2174, 2185` Version 8.0.3 diff --git a/src/click/utils.py b/src/click/utils.py index 051cf7009..8dd3a00c7 100644 --- a/src/click/utils.py +++ b/src/click/utils.py @@ -203,7 +203,7 @@ def __iter__(self) -> t.Iterator[t.AnyStr]: def echo( message: t.Optional[t.Any] = None, - file: t.Optional[t.IO] = None, + file: t.Optional[t.IO[t.Any]] = None, nl: bool = True, err: bool = False, color: t.Optional[bool] = None,