From b208f21fbd3b6a43889089c7311a4924aa3ae82d Mon Sep 17 00:00:00 2001 From: Shantanu Date: Fri, 6 Mar 2020 02:03:11 -0800 Subject: [PATCH] imghdr: h can be None (#3815) --- stdlib/2and3/imghdr.pyi | 2 +- tests/stubtest_whitelists/py3_common.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/stdlib/2and3/imghdr.pyi b/stdlib/2and3/imghdr.pyi index b9d8d17e3..1ea55a7e7 100644 --- a/stdlib/2and3/imghdr.pyi +++ b/stdlib/2and3/imghdr.pyi @@ -10,7 +10,7 @@ else: @overload -def what(file: _File) -> Optional[str]: ... +def what(file: _File, h: None = ...) -> Optional[str]: ... @overload def what(file: Any, h: bytes) -> Optional[str]: ... tests: List[Callable[[bytes, BinaryIO], Optional[str]]] diff --git a/tests/stubtest_whitelists/py3_common.txt b/tests/stubtest_whitelists/py3_common.txt index 4052ce140..b0283c48b 100644 --- a/tests/stubtest_whitelists/py3_common.txt +++ b/tests/stubtest_whitelists/py3_common.txt @@ -328,7 +328,6 @@ http.cookies.Morsel.update http.server.HTTPServer.__init__ imaplib.IMAP4_SSL.ssl imaplib.IMAP4_stream.open -imghdr.what importlib.abc.FileLoader.get_filename importlib.abc.Loader.exec_module importlib.abc.MetaPathFinder.find_spec