From 47f2746526fea2c3a0a4aa178d5a95be126dcaa5 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Tue, 2 Aug 2016 09:04:45 -0700 Subject: [PATCH] Fix the definitions of BadZip{f,F}ile. (#432) In 2.7, only BadZipfile exists. In 3.x, both exist. --- stdlib/2and3/zipfile.pyi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/stdlib/2and3/zipfile.pyi b/stdlib/2and3/zipfile.pyi index c8236acf6..455ca0db6 100644 --- a/stdlib/2and3/zipfile.pyi +++ b/stdlib/2and3/zipfile.pyi @@ -9,10 +9,11 @@ _SZI = Union[str, ZipInfo] _DT = Tuple[int, int, int, int, int, int] -class BadZipFile(Exception): ... - if sys.version_info >= (3,): + class BadZipFile(Exception): ... BadZipfile = BadZipFile +else: + class BadZipfile(Exception): ... class LargeZipFile(Exception): ...