Skip to content

Commit

Permalink
Python3Migration: components/* PRESUBMITs
Browse files Browse the repository at this point in the history
This CL migrates the majority of remaining PRESUBMITs in components/*.
There are a few still blocked by crbug.com/1212120 and one more that
may require additional python3 fixes that will be addressed in a
following CL.

Bug: 1211996, 1211998, 1212000, 1212003, 1212005, 1212006, 1212011, 1212012, 1212013, 1212019, 1212020

Change-Id: I561e5e199183b8389e95c2b3e0a5218ed77277bf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2971408
Auto-Submit: Elaine Chien <elainechien@chromium.org>
Commit-Queue: Ted Choc <tedchoc@chromium.org>
Reviewed-by: Ted Choc <tedchoc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#894893}
  • Loading branch information
Elaine Chien authored and Chromium LUCI CQ committed Jun 22, 2021
1 parent a91618b commit 93e9a0f
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/arc/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

USE_PYTHON3 = True

def CheckChangeOnUpload(input_api, output_api):
results = []
Expand Down
2 changes: 2 additions & 0 deletions components/autofill/content/renderer/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
for more details on the presubmit API built into depot_tools.
"""

USE_PYTHON3 = True

def _CheckNoDirectPasswordCalls(input_api, output_api):
"""Checks that no files call IsPasswordField() or FormControlType()."""
pattern = input_api.re.compile(
Expand Down
1 change: 1 addition & 0 deletions components/certificate_transparency/tools/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

"""Chromium presubmit script for src/net/tools/ct_log_list."""

USE_PYTHON3 = True

def _RunMakeCTLogListTests(input_api, output_api):
"""Runs make_ct_known_logs_list unittests if related files were modified."""
Expand Down
2 changes: 2 additions & 0 deletions components/guest_view/browser/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
match the corresponding bad_message.h file.
"""

USE_PYTHON3 = True

def _RunHistogramChecks(input_api, output_api, histogram_name):
try:
# Setup sys.path so that we can call histograms code.
Expand Down
2 changes: 2 additions & 0 deletions components/nacl/browser/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
match the corresponding bad_message.h file.
"""

USE_PYTHON3 = True

def _RunHistogramChecks(input_api, output_api, histogram_name):
try:
# Setup sys.path so that we can call histograms code.
Expand Down
2 changes: 2 additions & 0 deletions components/password_manager/content/browser/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

USE_PYTHON3 = True

"""Chromium presubmit script to check that BadMessage enums in histograms.xml
match the corresponding bad_message.h file.
"""
Expand Down
2 changes: 2 additions & 0 deletions components/safe_browsing/core/proto/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

USE_PYTHON3 = True

def CheckChangeOnUpload(input_api, output_api):
results = []

Expand Down
2 changes: 2 additions & 0 deletions components/safe_browsing/core/resources/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"""Presubmit checks for SafeBrowsing download_file_types.
"""

USE_PYTHON3 = True

def CheckVersionUpdatedInDownloadFileTypeList(input_api, output_api):
def IsDownloadFileTypeList(x):
return (input_api.os_path.basename(x.LocalPath()) ==
Expand Down
2 changes: 2 additions & 0 deletions components/subresource_filter/core/common/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
for more details about the presubmit API built into depot_tools.
"""

USE_PYTHON3 = True

def CheckIndexedRulesetVersion(input_api, output_api):
""" Checks that IndexedRuleset format version is modified when necessary.
Expand Down
2 changes: 2 additions & 0 deletions components/url_pattern_index/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
for more details about the presubmit API built into depot_tools.
"""

USE_PYTHON3 = True

def CheckUrlPatternIndexFormatVersion(input_api, output_api):
""" Checks the kUrlPatternIndexFormatVersion is modified when necessary.
Expand Down
2 changes: 1 addition & 1 deletion components/variations/proto/PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
See https://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the presubmit API built into depot_tools.
"""

USE_PYTHON3 = True

def CheckChange(input_api, output_api):
"""Checks that changes to client_variations.proto are mirrored."""
Expand Down

0 comments on commit 93e9a0f

Please sign in to comment.