Skip to content

Commit

Permalink
Bug 1710081 [wpt PR 28896] - Drop read_gzp workaround for a mypy prob…
Browse files Browse the repository at this point in the history
…lem 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 web-platform-tests/wpt#28895.
--

wpt-commits: e953dffdcee1a2a276ea0b73c15e3c6e04d4683f
wpt-pr: 28896
  • Loading branch information
foolip authored and moz-wptsync-bot committed May 8, 2021
1 parent c8d0e8c commit 97c030a
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions testing/web-platform/tests/tools/manifest/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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()
Expand Down

0 comments on commit 97c030a

Please sign in to comment.