Commit f17d0f99 authored by Robert Ma's avatar Robert Ma Committed by Commit Bot

[blinkpy] Roll WPT tools to 8b1df3d520335fb42ef4bfd50b9121ac41995f8e

from c808aa3d15a42648d8b25a838024813990959e37

Change-Id: Ibec6a32fc4994773b728214ce9c1ab944dd00e85
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495242
Commit-Queue: Robert Ma <robertma@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Auto-Submit: Robert Ma <robertma@chromium.org>
Reviewed-by: default avatarStephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820274}
parent dd300217
......@@ -22,7 +22,7 @@ Local Modifications: None
Name: web-platform-tests - Test Suites for Web Platform specifications
Short Name: wpt
URL: https://github.com/web-platform-tests/wpt/
Version: c808aa3d15a42648d8b25a838024813990959e37
Version: 8b1df3d520335fb42ef4bfd50b9121ac41995f8e
License: LICENSES FOR W3C TEST SUITES (https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html)
License File: wpt/wpt/LICENSE.md
Security Critical: no
......
......@@ -9,7 +9,7 @@ cd $DIR
TARGET_DIR=$DIR/wpt
REMOTE_REPO="https://github.com/web-platform-tests/wpt.git"
WPT_HEAD=c808aa3d15a42648d8b25a838024813990959e37
WPT_HEAD=8b1df3d520335fb42ef4bfd50b9121ac41995f8e
function clone {
# Remove existing repo if already exists.
......
import io
from six import ensure_text
MYPY = False
if MYPY:
# MYPY is set to True when run under Mypy.
from typing import Any
from typing import Optional
from typing import Text
from typing import AnyStr, Optional, Text
class GitHubChecksOutputter(object):
"""Provides a method to output data to be shown in the GitHub Checks UI.
......@@ -12,23 +14,27 @@ class GitHubChecksOutputter(object):
to enable developers to quickly understand what has gone wrong. The output
supports markdown format.
See https://docs.taskcluster.net/docs/reference/integrations/github/checks#custom-text-output-in-checks
https://docs.taskcluster.net/docs/reference/integrations/github/checks#custom-text-output-in-checks
"""
def __init__(self, path):
# type: (Text) -> None
self.path = path
def output(self, line):
# type: (Any) -> None
# TODO(stephenmcgruer): Once mypy 0.790 is released, we can change this
# to AnyStr, as that release teaches mypy about the mode flags of open.
# See https://github.com/python/typeshed/pull/4146
with open(self.path, 'a') as f:
f.write(line)
f.write('\n')
# type: (AnyStr) -> None
text = ensure_text(line)
# NOTE: mypy types the "text mode" of open() in Python 2 as BinaryIO,
# which makes sense as we cannot specify its encoding (it's
# platform-dependent), while io.open() is closer to open() in Python 3.
# TODO: use the built-in open() when we are Py3-only.
with io.open(self.path, mode="a") as f:
f.write(text)
f.write(u"\n")
__outputter = None
def get_gh_checks_outputter(filepath):
# type: (Optional[Text]) -> Optional[GitHubChecksOutputter]
"""Return the outputter for GitHub Checks output, if enabled.
......
......@@ -152,7 +152,7 @@ def repo_files_changed(revish, include_uncommitted=False, include_new=False):
assert not entries[-1]
entries = entries[:-1]
for item in entries:
status, path = item.split()
status, path = item.split(" ", 1)
if status == "??" and not include_new:
continue
else:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment