Bug 1710081 [wpt PR 28896] - Drop read_gzp workaround for a mypy problem in Python 2, a=testonly

Automatic update from web-platform-tests
Drop read_gzp workaround for a mypy problem in Python 2 (#28896)

There's no issue here with mypy on Python 3.

Part of https://github.com/web-platform-tests/wpt/pull/28895.
--

wpt-commits: e953dffdcee1a2a276ea0b73c15e3c6e04d4683f
wpt-pr: 28896
This commit is contained in:
Philip Jägenstedt 2021-05-08 10:04:59 +00:00 committed by moz-wptsync-bot
parent c8d0e8c831
commit 97c030a363

View File

@ -158,7 +158,7 @@ def download_manifest(
fileobj = io.BytesIO(resp.read())
try:
with gzip.GzipFile(fileobj=fileobj) as gzf:
data = read_gzf(gzf) # type: ignore
data = gzf.read()
decompressed = data
except IOError:
logger.warning("Failed to decompress downloaded file")
@ -180,12 +180,6 @@ def download_manifest(
return True
def read_gzf(gzf): # type: ignore
# This is working around a mypy problem in Python 2:
# "Call to untyped function "read" in typed context"
return gzf.read()
def create_parser():
# type: () -> argparse.ArgumentParser
parser = argparse.ArgumentParser()