From 7eb8d6de93135b19e7dc88fc9a3484ee2038526e Mon Sep 17 00:00:00 2001 From: Maksim Sadym Date: Fri, 6 Dec 2024 14:14:17 +0100 Subject: [PATCH] reformat --- tools/lint/lint.py | 6 +++--- tools/lint/tests/test_file_lints.py | 2 +- tools/manifest/sourcefile.py | 3 +-- tools/manifest/tests/test_manifest.py | 3 ++- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/lint/lint.py b/tools/lint/lint.py index 80da4c430f3008f..520c13bc2d063bf 100644 --- a/tools/lint/lint.py +++ b/tools/lint/lint.py @@ -568,12 +568,12 @@ def is_query_string_correct(script: Text, src: Text, if not is_path_correct("testharness.js", src) or not is_query_string_correct( - "testharness.js", src): + "testharness.js", src): errors.append(rules.TestharnessPath.error(path)) if not is_path_correct("testharnessreport.js", src) or not is_query_string_correct( - "testharnessreport.js", src): + "testharnessreport.js", src): errors.append(rules.TestharnessReportPath.error(path)) if not is_path_correct("testdriver.js", src): @@ -584,7 +584,7 @@ def is_query_string_correct(script: Text, src: Text, if not is_path_correct("testdriver-vendor.js", src) or not is_query_string_correct( - "testdriver-vendor.js", src): + "testdriver-vendor.js", src): errors.append(rules.TestdriverVendorPath.error(path)) script_path = None diff --git a/tools/lint/tests/test_file_lints.py b/tools/lint/tests/test_file_lints.py index c2378eae9b1515f..5443feca4b6a0f4 100644 --- a/tools/lint/tests/test_file_lints.py +++ b/tools/lint/tests/test_file_lints.py @@ -627,7 +627,7 @@ def test_testdriver_multiple_vendor_features(): check_errors(errors) if kind == "web-lax": - assert errors == [ ] + assert errors == [] elif kind == "python": assert errors == [ ('PARSE-FAILED', 'Unable to parse file', filename, 2), diff --git a/tools/manifest/sourcefile.py b/tools/manifest/sourcefile.py index cef5ef40a9b98b0..d46dd3263bb0ac0 100644 --- a/tools/manifest/sourcefile.py +++ b/tools/manifest/sourcefile.py @@ -6,7 +6,7 @@ from io import BytesIO from typing import (Any, BinaryIO, Callable, Deque, Dict, Iterable, List, Optional, Pattern, Set, Text, Tuple, TypedDict, Union, cast) -from urllib.parse import urlparse, parse_qs, urljoin +from urllib.parse import parse_qs, urlparse, urljoin try: from xml.etree import cElementTree as ElementTree @@ -757,7 +757,6 @@ def ___get_testdriver_include_path(self): return None - @cached_property def testdriver_features(self) -> Optional[Text]: """ diff --git a/tools/manifest/tests/test_manifest.py b/tools/manifest/tests/test_manifest.py index f808fc04f3f53c7..a0c75dff03f6adc 100644 --- a/tools/manifest/tests/test_manifest.py +++ b/tools/manifest/tests/test_manifest.py @@ -297,7 +297,8 @@ def test_update_from_json_modified(): testdriver_features = ['feature_1', 'feature_2'] # Update timeout, pac and testdriver_features - s2 = SourceFileWithTest("test1", "1" * 40, item.TestharnessTest, timeout="long", pac="proxy.pac", + s2 = SourceFileWithTest("test1", "1" * 40, item.TestharnessTest, + timeout="long", pac="proxy.pac", testdriver_features=testdriver_features) tree, sourcefile_mock = tree_and_sourcefile_mocks([(s2, None, True)]) with mock.patch("tools.manifest.manifest.SourceFile", side_effect=sourcefile_mock):