fetch_configs: switch to 4 space indent

Reformat this dir by itself to help merging with conflicts with other CLs.

Reformatted using:
parallel ./yapf -i -- fetch_configs/*
~/chromiumos/chromite/contrib/reflow_overlong_comments fetch_configs/*

The 2 files that still had strings that were too long were manually
reformatted.
fetch_configs/config_util.py
fetch_configs/devtools-internal.py

Change-Id: Ic8aaf41fa462342743a39166da98c4e915fadd44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4844310
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Auto-Submit: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Josip Sokcevic <sokcevic@chromium.org>
changes/10/4844310/2
Mike Frysinger 2 years ago committed by LUCI CQ
parent e4829e85fa
commit 691128f836

@ -0,0 +1,3 @@
[style]
based_on_style = pep8
column_limit = 80

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Android(config_util.Config):
"""Basic Config alias for Android -> Chromium."""
@staticmethod
def fetch_spec(props):
return {

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class AndroidInternal(config_util.Config):
"""Basic Config alias for AndroidInternal -> Chromium."""
@staticmethod
def fetch_spec(props):
return {

@ -12,7 +12,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class ANGLE(config_util.Config):
"""Basic Config class for ANGLE."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/angle/angle.git'
@ -23,9 +22,7 @@ class ANGLE(config_util.Config):
'managed': False,
'custom_vars': {},
}
spec = {
'solutions': [solution]
}
spec = {'solutions': [solution]}
if props.get('target_os'):
spec['target_os'] = props['target_os'].split(',')
if ast.literal_eval(props.get('internal', 'False')):

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Chrome(config_util.Config):
"""Basic Config alias for Chrome -> Chromium."""
@staticmethod
def fetch_spec(props):
return {

@ -12,13 +12,13 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Chromium(config_util.Config):
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/chromium/src.git'
solution = { 'name' :'src',
'url' : url,
'managed' : False,
solution = {
'name': 'src',
'url': url,
'managed': False,
'custom_deps': {},
'custom_vars': {},
}

@ -1,7 +1,6 @@
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""This module holds utilities which make writing configs easier."""
from __future__ import print_function
@ -13,12 +12,13 @@ class Config(object):
"""Base class for all configs.
Provides methods that are expected to be overridden by child classes. Also
provides an command-line parsing method that converts the unified command-line
interface used in depot_tools to the unified python interface defined here."""
provides an command-line parsing method that converts the unified
command-line interface used in depot_tools to the unified python interface
defined here.
"""
@staticmethod
def fetch_spec(_props):
"""Returns instructions to check out the project, conditioned on |props|."""
"""Returns instructions to check out the project based on |props|."""
raise NotImplementedError
@staticmethod
@ -27,9 +27,8 @@ class Config(object):
raise NotImplementedError
def handle_args(self, argv):
"""Passes the command-line arguments through to the appropriate method."""
methods = {'fetch': self.fetch_spec,
'root': self.expected_root}
"""Passes command-line arguments through to the appropriate method."""
methods = {'fetch': self.fetch_spec, 'root': self.expected_root}
if len(argv) <= 1 or argv[1] not in methods:
print('Must specify a a fetch/root action')
return 1

@ -11,14 +11,14 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class CrashpadConfig(config_util.Config):
"""Basic Config class for Crashpad."""
@staticmethod
def fetch_spec(props):
spec = {
'solutions': [
{
'name': 'crashpad',
'url': 'https://chromium.googlesource.com/crashpad/crashpad.git',
'url':
'https://chromium.googlesource.com/crashpad/crashpad.git',
'managed': False,
},
],

@ -11,15 +11,14 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Dart(config_util.Config):
"""Basic Config class for Dart."""
@staticmethod
def fetch_spec(props):
url = 'https://dart.googlesource.com/sdk.git'
solution = {
'name' :'sdk',
'url' : url,
'name': 'sdk',
'url': url,
'deps_file': 'DEPS',
'managed' : False,
'managed': False,
'custom_deps': {},
}
spec = {

@ -11,15 +11,14 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class DepotTools(config_util.Config):
"""Basic Config class for DepotTools."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/chromium/tools/depot_tools.git'
solution = {
'name' : 'depot_tools',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'name': 'depot_tools',
'url': url,
'deps_file': 'DEPS',
'managed': False,
}
spec = {
'solutions': [solution],

@ -11,16 +11,15 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class DevToolsFrontend(config_util.Config):
"""Basic Config class for DevTools frontend."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/devtools/devtools-frontend.git'
solution = {
'name' : 'devtools-frontend',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
'name': 'devtools-frontend',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],

@ -11,16 +11,16 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class DevToolsInternal(config_util.Config):
"""Basic Config class for the whole set of DevTools."""
@staticmethod
def fetch_spec(props):
url = 'https://chrome-internal.googlesource.com/devtools/devtools-internal.git'
url = ('https://chrome-internal.googlesource.com/devtools/'
'devtools-internal.git')
solution = {
'name' : 'devtools-internal',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
'name': 'devtools-internal',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],

@ -11,20 +11,17 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Flutter(config_util.Config):
"""Basic Config class for the Flutter repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'custom_deps': {},
'deps_file': 'DEPS',
'managed' : False,
'name' : 'src/flutter',
'managed': False,
'name': 'src/flutter',
'safesync_url': '',
'url' : 'https://github.com/flutter/engine.git',
}
spec = {
'solutions': [solution]
'url': 'https://github.com/flutter/engine.git',
}
spec = {'solutions': [solution]}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,

@ -11,15 +11,14 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Gn(config_util.Config):
"""Basic Config class for Gn."""
@staticmethod
def fetch_spec(props):
url = 'https://gn.googlesource.com/gn.git'
solution = {
'name' :'gn',
'url' : url,
'name': 'gn',
'url': url,
'deps_file': 'DEPS',
'managed' : False,
'managed': False,
}
spec = {
'solutions': [solution],

@ -11,20 +11,18 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class GomaClient(config_util.Config):
"""Basic Config class for Goma client."""
@staticmethod
def fetch_spec(_props):
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [
{
'name' : 'client',
'url' : 'https://chromium.googlesource.com/infra/goma/client.git',
'solutions': [{
'name': 'client',
'url':
'https://chromium.googlesource.com/infra/goma/client.git',
'deps_file': 'DEPS',
'managed' : False,
}
],
'managed': False,
}],
},
}

@ -11,13 +11,13 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Chromium(config_util.Config):
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/external/gyp.git'
solution = { 'name' :'gyp',
'url' : url,
'managed' : False,
solution = {
'name': 'gyp',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Infra(config_util.Config):
"""Basic Config class for the Infrastructure repositories."""
@staticmethod
def fetch_spec(props):
return {

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class InfraInternal(config_util.Config):
"""Basic Config class for the whole set of Infrastructure repositories."""
@staticmethod
def fetch_spec(_props):
return {

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class IOS(config_util.Config):
"""Basic Config alias for iOS -> Chromium."""
@staticmethod
def fetch_spec(props):
return {

@ -11,12 +11,12 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class IOSInternal(config_util.Config):
"""Basic Config class for Chrome on iOS."""
@staticmethod
def fetch_spec(props):
return {
'alias': {
'config': 'chromium',
'config':
'chromium',
'props': [
'--internal=True',
'--target_os=ios',

@ -11,17 +11,16 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class NaCl(config_util.Config):
"""Basic Config class for NaCl."""
@staticmethod
def fetch_spec(props):
url = ('https://chromium.googlesource.com/native_client/'
'src/native_client.git')
solution = {
'name' : 'native_client',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
'name': 'native_client',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],

@ -11,16 +11,15 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Naclports(config_util.Config):
"""Basic Config class for naclports."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/external/naclports.git'
solution = {
'name' : 'src',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
'name': 'src',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class NodeCI(config_util.Config):
"""Basic Config class for node-ci."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/v8/node-ci.git'
@ -19,11 +18,11 @@ class NodeCI(config_util.Config):
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [{
'name' : 'node-ci',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
'name': 'node-ci',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}],
},
}

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class PdfiumConfig(config_util.Config):
"""Basic Config class for pdfium."""
@staticmethod
def fetch_spec(props):
url = 'https://pdfium.googlesource.com/pdfium.git'

@ -11,18 +11,15 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Skia(config_util.Config):
"""Basic Config class for the Skia repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'name' : 'skia',
'url' : 'https://skia.googlesource.com/skia.git',
'name': 'skia',
'url': 'https://skia.googlesource.com/skia.git',
'deps_file': 'DEPS',
'managed' : False,
}
spec = {
'solutions': [solution]
'managed': False,
}
spec = {'solutions': [solution]}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,

@ -11,18 +11,15 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class SkiaBuildbot(config_util.Config):
"""Basic Config class for the Skia Buildbot repository."""
@staticmethod
def fetch_spec(_props):
solution = {
'name' : 'buildbot',
'url' : 'https://skia.googlesource.com/buildbot.git',
'name': 'buildbot',
'url': 'https://skia.googlesource.com/buildbot.git',
'deps_file': 'DEPS',
'managed' : False,
}
spec = {
'solutions': [solution]
'managed': False,
}
spec = {'solutions': [solution]}
return {
'type': 'gclient_git',
'gclient_git_spec': spec,

@ -11,20 +11,17 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Syzygy(config_util.Config):
"""Basic Config class for Syzygy."""
@staticmethod
def fetch_spec(_props):
return {
'type': 'gclient_git',
'gclient_git_spec': {
'solutions': [
{
'name' : 'src',
'url' : 'https://chromium.googlesource.com/syzygy',
'solutions': [{
'name': 'src',
'url': 'https://chromium.googlesource.com/syzygy',
'deps_file': 'DEPS',
'managed' : False,
}
],
'managed': False,
}],
},
}

@ -11,16 +11,15 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class V8(config_util.Config):
"""Basic Config class for V8."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/v8/v8.git'
solution = {
'name' : 'v8',
'url' : url,
'deps_file' : 'DEPS',
'managed' : False,
'custom_deps' : {},
'name': 'v8',
'url': url,
'deps_file': 'DEPS',
'managed': False,
'custom_deps': {},
}
spec = {
'solutions': [solution],

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class WebRTC(config_util.Config):
"""Basic Config class for WebRTC."""
@staticmethod
def fetch_spec(props):
url = 'https://webrtc.googlesource.com/src.git'
@ -25,7 +24,8 @@ class WebRTC(config_util.Config):
'custom_deps': {},
},
],
'with_branch_heads': True,
'with_branch_heads':
True,
}
if props.get('target_os'):

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class WebRTCAndroid(config_util.Config):
"""Basic Config alias for Android -> WebRTC."""
@staticmethod
def fetch_spec(props):
return {

@ -11,7 +11,6 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class WebRTCIOS(config_util.Config):
"""Basic Config alias for iOS -> WebRTC."""
@staticmethod
def fetch_spec(props):
return {

@ -11,13 +11,13 @@ import config_util # pylint: disable=import-error
# pylint: disable=no-init
class Website(config_util.Config):
"""Basic Config class for Chromium."""
@staticmethod
def fetch_spec(props):
url = 'https://chromium.googlesource.com/website.git'
solution = { 'name' :'website',
'url' : url,
'managed' : False,
solution = {
'name': 'website',
'url': url,
'managed': False,
'custom_deps': {},
}
spec = {

Loading…
Cancel
Save