0
Files
src/components/browser_sync/PRESUBMIT.py
Takuto Ikuta 7507a8ca7b components: remove USE_PYTHON3 = True from PRESUBMIT.py
presubmit now uses python3 only.

This is generated by
$ rg -l '^USE_PYTHON3 = True' | \
  xargs sed -z -i "s/\n*USE_PYTHON3 = True\n*/\n\n/"
with some more modifications.

This also removes run_on_python2, run_on_python3, and skip_shebang_check
args.

Bug: 1207012
Change-Id: I34707fe17f320fc147163f8210188328ad339d78
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4576821
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152169}
2023-06-01 22:06:55 +00:00

31 lines
1.0 KiB
Python

# Copyright 2016 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Presubmit script for browser_sync component.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into depot_tools.
"""
import re
BROWSER_SYNC_SOURCE_FILES = (r'^components[\\/]browser_sync[\\/].*\.(cc|h)$',)
def CheckChangeLintsClean(input_api, output_api):
source_filter = lambda x: input_api.FilterSourceFile(
x, files_to_check=BROWSER_SYNC_SOURCE_FILES, files_to_skip=None)
return input_api.canned_checks.CheckChangeLintsClean(
input_api, output_api, source_filter, lint_filters=[], verbose_level=1)
def CheckChanges(input_api, output_api):
results = []
results += CheckChangeLintsClean(input_api, output_api)
return results
def CheckChangeOnUpload(input_api, output_api):
return CheckChanges(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return CheckChanges(input_api, output_api)