Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit 03fee77

Browse files
committed
fix linting
1 parent 44e0b6a commit 03fee77

2 files changed

Lines changed: 70 additions & 70 deletions

File tree

compatibility_lib/compatibility_lib/configs.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Copyright 2018 Google LLC
2-
32
#
43
# Licensed under the Apache License, Version 2.0 (the "License");
54
# you may not use this file except in compliance with the License.
@@ -16,6 +15,13 @@
1615
"""Common configs for compatibility_lib."""
1716

1817

18+
def _format_url(repo_name, setuppy_path=''):
19+
url = 'git%2Bgit://github.com/{}.git'.format(repo_name)
20+
if setuppy_path != '':
21+
url = '{}%23subdirectory={}'.format(url, setuppy_path)
22+
return url
23+
24+
1925
# IGNORED_DEPENDENCIES are not direct dependencies for many packages and are
2026
# not installed via pip, resulting in unresolvable high priority warnings.
2127
IGNORED_DEPENDENCIES = [
@@ -65,12 +71,6 @@
6571
'gcloud',
6672
]
6773

68-
def _format_url(repo_name, setuppy_path=''):
69-
url = 'git%2Bgit://github.com/{}.git'.format(repo_name)
70-
if setuppy_path != '':
71-
url = '{}%23subdirectory={}'.format(url, setuppy_path)
72-
return url
73-
7474
WHITELIST_PKGS = PKG_LIST
7575

7676
WHITELIST_URLS = {
@@ -80,7 +80,7 @@ def _format_url(repo_name, setuppy_path=''):
8080
_format_url('googleapis/google-cloud-python', 'dlp'): 'gcloud',
8181
_format_url('googleapis/google-cloud-python', 'iot'): 'gcloud',
8282
_format_url('googleapis/google-cloud-python', 'kms'): 'gcloud',
83-
_format_url('googleapis/google-cloud-python', 'legacy/google-cloud'): \
83+
_format_url('googleapis/google-cloud-python', 'legacy/google-cloud'):
8484
'gcloud',
8585
_format_url('googleapis/google-cloud-python', 'ndb'): 'gcloud',
8686
_format_url('googleapis/google-cloud-python', 'oslogin'): 'gcloud',
@@ -89,65 +89,65 @@ def _format_url(repo_name, setuppy_path=''):
8989
_format_url('googleapis/google-cloud-python', 'tasks'): 'gcloud',
9090
_format_url('googleapis/google-cloud-python', 'test_utils'): 'gcloud',
9191
_format_url('googleapis/google-cloud-python', 'texttospeech'): 'gcloud',
92-
_format_url('googleapis/google-cloud-python', 'websecurityscanner'): \
92+
_format_url('googleapis/google-cloud-python', 'websecurityscanner'):
9393
'gcloud',
94-
_format_url('googleapis/google-cloud-python', 'api_core'): \
94+
_format_url('googleapis/google-cloud-python', 'api_core'):
9595
'google-api-core',
96-
_format_url('googleapis/google-cloud-python', 'bigquery'): \
96+
_format_url('googleapis/google-cloud-python', 'bigquery'):
9797
'google-cloud-bigquery',
98-
_format_url('googleapis/google-cloud-python', 'bigquery_datatransfer'): \
98+
_format_url('googleapis/google-cloud-python', 'bigquery_datatransfer'):
9999
'google-cloud-bigquery-datatransfer',
100-
_format_url('googleapis/google-cloud-python', 'bigtable'): \
100+
_format_url('googleapis/google-cloud-python', 'bigtable'):
101101
'google-cloud-bigtable',
102-
_format_url('googleapis/google-cloud-python', 'container'): \
102+
_format_url('googleapis/google-cloud-python', 'container'):
103103
'google-cloud-container',
104-
_format_url('googleapis/google-cloud-python', 'core'): \
104+
_format_url('googleapis/google-cloud-python', 'core'):
105105
'google-cloud-core',
106-
_format_url('googleapis/google-cloud-python', 'datastore'): \
106+
_format_url('googleapis/google-cloud-python', 'datastore'):
107107
'google-cloud-datastore',
108108
_format_url('googleapis/google-cloud-python', 'dns'): 'google-cloud-dns',
109-
_format_url('googleapis/google-cloud-python', 'error_reporting'): \
109+
_format_url('googleapis/google-cloud-python', 'error_reporting'):
110110
'google-cloud-error-reporting',
111-
_format_url('googleapis/google-cloud-python', 'firestore'): \
111+
_format_url('googleapis/google-cloud-python', 'firestore'):
112112
'google-cloud-firestore',
113-
_format_url('googleapis/google-cloud-python', 'language'): \
113+
_format_url('googleapis/google-cloud-python', 'language'):
114114
'google-cloud-language',
115-
_format_url('googleapis/google-cloud-python', 'logging'): \
115+
_format_url('googleapis/google-cloud-python', 'logging'):
116116
'google-cloud-logging',
117-
_format_url('googleapis/google-cloud-python', 'monitoring'): \
117+
_format_url('googleapis/google-cloud-python', 'monitoring'):
118118
'google-cloud-monitoring',
119-
_format_url('googleapis/google-cloud-python', 'pubsub'): \
119+
_format_url('googleapis/google-cloud-python', 'pubsub'):
120120
'google-cloud-pubsub',
121-
_format_url('googleapis/google-cloud-python', 'resource_manager'): \
121+
_format_url('googleapis/google-cloud-python', 'resource_manager'):
122122
'google-cloud-resource-manager',
123-
_format_url('googleapis/google-cloud-python', 'runtimeconfig'): \
123+
_format_url('googleapis/google-cloud-python', 'runtimeconfig'):
124124
'google-cloud-runtimeconfig',
125-
_format_url('googleapis/google-cloud-python', 'spanner'): \
125+
_format_url('googleapis/google-cloud-python', 'spanner'):
126126
'google-cloud-spanner',
127-
_format_url('googleapis/google-cloud-python', 'speech'): \
127+
_format_url('googleapis/google-cloud-python', 'speech'):
128128
'google-cloud-speech',
129-
_format_url('googleapis/google-cloud-python', 'storage'): \
129+
_format_url('googleapis/google-cloud-python', 'storage'):
130130
'google-cloud-storage',
131-
_format_url('googleapis/google-cloud-python', 'trace'): \
131+
_format_url('googleapis/google-cloud-python', 'trace'):
132132
'google-cloud-trace',
133-
_format_url('googleapis/google-cloud-python', 'translate'): \
133+
_format_url('googleapis/google-cloud-python', 'translate'):
134134
'google-cloud-translate',
135-
_format_url('googleapis/google-cloud-python', 'videointelligence'): \
135+
_format_url('googleapis/google-cloud-python', 'videointelligence'):
136136
'google-cloud-videointelligence',
137-
_format_url('googleapis/google-cloud-python', 'vision'): \
137+
_format_url('googleapis/google-cloud-python', 'vision'):
138138
'google-cloud-vision',
139-
_format_url('googleapis/google-api-python-client'): \
139+
_format_url('googleapis/google-api-python-client'):
140140
'google-api-python-client',
141141
_format_url('googleapis/google-auth-library-python'): 'google-auth',
142-
_format_url('GoogleCloudPlatform/google-resumable-media-python'): \
142+
_format_url('GoogleCloudPlatform/google-resumable-media-python'):
143143
'google-resumable-media',
144144
_format_url('apache/beam', 'sdks/python'): 'apache-beam[gcp]',
145145
_format_url('google/apitools'): 'google-apitools',
146146
_format_url('GoogleCloudPlatform/gsutil'): 'gsutil',
147147
_format_url('census-instrumentation/opencensus-python'): 'opencensus',
148148
_format_url('protocolbuffers/protobuf', 'python'): 'protobuf',
149149
_format_url('google/protorpc'): 'protorpc',
150-
_format_url('tensorflow/tensorflow', 'tensorflow/tools/pip_package'): \
150+
_format_url('tensorflow/tensorflow', 'tensorflow/tools/pip_package'):
151151
'tensorflow',
152152
_format_url('tensorflow/tensorflow',
153153
'tensorflow/contrib/tpu/profiler/pip_package'): 'tensorflow',
@@ -156,7 +156,7 @@ def _format_url(repo_name, setuppy_path=''):
156156
# grpc-google-iam-v1
157157
# grpcio
158158
# tensorboard - not sure what the build process is
159-
# _format_url('tensorflow/tensorboard', 'tensorboard/pip_package'): \
159+
# _format_url('tensorflow/tensorboard', 'tensorboard/pip_package'):
160160
# 'tensorboard',
161161
}
162162

compatibility_server/configs.py

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Copyright 2018 Google LLC
2-
32
#
43
# Licensed under the Apache License, Version 2.0 (the "License");
54
# you may not use this file except in compliance with the License.
@@ -16,6 +15,13 @@
1615
"""Common configs for compatibility_lib."""
1716

1817

18+
def _format_url(repo_name, setuppy_path=''):
19+
url = 'git%2Bgit://github.com/{}.git'.format(repo_name)
20+
if setuppy_path != '':
21+
url = '{}%23subdirectory={}'.format(url, setuppy_path)
22+
return url
23+
24+
1925
# IGNORED_DEPENDENCIES are not direct dependencies for many packages and are
2026
# not installed via pip, resulting in unresolvable high priority warnings.
2127
IGNORED_DEPENDENCIES = [
@@ -65,12 +71,6 @@
6571
'gcloud',
6672
]
6773

68-
def _format_url(repo_name, setuppy_path=''):
69-
url = 'git%2Bgit://github.com/{}.git'.format(repo_name)
70-
if setuppy_path != '':
71-
url = '{}%23subdirectory={}'.format(url, setuppy_path)
72-
return url
73-
7474
WHITELIST_PKGS = PKG_LIST
7575

7676
WHITELIST_URLS = {
@@ -80,7 +80,7 @@ def _format_url(repo_name, setuppy_path=''):
8080
_format_url('googleapis/google-cloud-python', 'dlp'): 'gcloud',
8181
_format_url('googleapis/google-cloud-python', 'iot'): 'gcloud',
8282
_format_url('googleapis/google-cloud-python', 'kms'): 'gcloud',
83-
_format_url('googleapis/google-cloud-python', 'legacy/google-cloud'): \
83+
_format_url('googleapis/google-cloud-python', 'legacy/google-cloud'):
8484
'gcloud',
8585
_format_url('googleapis/google-cloud-python', 'ndb'): 'gcloud',
8686
_format_url('googleapis/google-cloud-python', 'oslogin'): 'gcloud',
@@ -89,65 +89,65 @@ def _format_url(repo_name, setuppy_path=''):
8989
_format_url('googleapis/google-cloud-python', 'tasks'): 'gcloud',
9090
_format_url('googleapis/google-cloud-python', 'test_utils'): 'gcloud',
9191
_format_url('googleapis/google-cloud-python', 'texttospeech'): 'gcloud',
92-
_format_url('googleapis/google-cloud-python', 'websecurityscanner'): \
92+
_format_url('googleapis/google-cloud-python', 'websecurityscanner'):
9393
'gcloud',
94-
_format_url('googleapis/google-cloud-python', 'api_core'): \
94+
_format_url('googleapis/google-cloud-python', 'api_core'):
9595
'google-api-core',
96-
_format_url('googleapis/google-cloud-python', 'bigquery'): \
96+
_format_url('googleapis/google-cloud-python', 'bigquery'):
9797
'google-cloud-bigquery',
98-
_format_url('googleapis/google-cloud-python', 'bigquery_datatransfer'): \
98+
_format_url('googleapis/google-cloud-python', 'bigquery_datatransfer'):
9999
'google-cloud-bigquery-datatransfer',
100-
_format_url('googleapis/google-cloud-python', 'bigtable'): \
100+
_format_url('googleapis/google-cloud-python', 'bigtable'):
101101
'google-cloud-bigtable',
102-
_format_url('googleapis/google-cloud-python', 'container'): \
102+
_format_url('googleapis/google-cloud-python', 'container'):
103103
'google-cloud-container',
104-
_format_url('googleapis/google-cloud-python', 'core'): \
104+
_format_url('googleapis/google-cloud-python', 'core'):
105105
'google-cloud-core',
106-
_format_url('googleapis/google-cloud-python', 'datastore'): \
106+
_format_url('googleapis/google-cloud-python', 'datastore'):
107107
'google-cloud-datastore',
108108
_format_url('googleapis/google-cloud-python', 'dns'): 'google-cloud-dns',
109-
_format_url('googleapis/google-cloud-python', 'error_reporting'): \
109+
_format_url('googleapis/google-cloud-python', 'error_reporting'):
110110
'google-cloud-error-reporting',
111-
_format_url('googleapis/google-cloud-python', 'firestore'): \
111+
_format_url('googleapis/google-cloud-python', 'firestore'):
112112
'google-cloud-firestore',
113-
_format_url('googleapis/google-cloud-python', 'language'): \
113+
_format_url('googleapis/google-cloud-python', 'language'):
114114
'google-cloud-language',
115-
_format_url('googleapis/google-cloud-python', 'logging'): \
115+
_format_url('googleapis/google-cloud-python', 'logging'):
116116
'google-cloud-logging',
117-
_format_url('googleapis/google-cloud-python', 'monitoring'): \
117+
_format_url('googleapis/google-cloud-python', 'monitoring'):
118118
'google-cloud-monitoring',
119-
_format_url('googleapis/google-cloud-python', 'pubsub'): \
119+
_format_url('googleapis/google-cloud-python', 'pubsub'):
120120
'google-cloud-pubsub',
121-
_format_url('googleapis/google-cloud-python', 'resource_manager'): \
121+
_format_url('googleapis/google-cloud-python', 'resource_manager'):
122122
'google-cloud-resource-manager',
123-
_format_url('googleapis/google-cloud-python', 'runtimeconfig'): \
123+
_format_url('googleapis/google-cloud-python', 'runtimeconfig'):
124124
'google-cloud-runtimeconfig',
125-
_format_url('googleapis/google-cloud-python', 'spanner'): \
125+
_format_url('googleapis/google-cloud-python', 'spanner'):
126126
'google-cloud-spanner',
127-
_format_url('googleapis/google-cloud-python', 'speech'): \
127+
_format_url('googleapis/google-cloud-python', 'speech'):
128128
'google-cloud-speech',
129-
_format_url('googleapis/google-cloud-python', 'storage'): \
129+
_format_url('googleapis/google-cloud-python', 'storage'):
130130
'google-cloud-storage',
131-
_format_url('googleapis/google-cloud-python', 'trace'): \
131+
_format_url('googleapis/google-cloud-python', 'trace'):
132132
'google-cloud-trace',
133-
_format_url('googleapis/google-cloud-python', 'translate'): \
133+
_format_url('googleapis/google-cloud-python', 'translate'):
134134
'google-cloud-translate',
135-
_format_url('googleapis/google-cloud-python', 'videointelligence'): \
135+
_format_url('googleapis/google-cloud-python', 'videointelligence'):
136136
'google-cloud-videointelligence',
137-
_format_url('googleapis/google-cloud-python', 'vision'): \
137+
_format_url('googleapis/google-cloud-python', 'vision'):
138138
'google-cloud-vision',
139-
_format_url('googleapis/google-api-python-client'): \
139+
_format_url('googleapis/google-api-python-client'):
140140
'google-api-python-client',
141141
_format_url('googleapis/google-auth-library-python'): 'google-auth',
142-
_format_url('GoogleCloudPlatform/google-resumable-media-python'): \
142+
_format_url('GoogleCloudPlatform/google-resumable-media-python'):
143143
'google-resumable-media',
144144
_format_url('apache/beam', 'sdks/python'): 'apache-beam[gcp]',
145145
_format_url('google/apitools'): 'google-apitools',
146146
_format_url('GoogleCloudPlatform/gsutil'): 'gsutil',
147147
_format_url('census-instrumentation/opencensus-python'): 'opencensus',
148148
_format_url('protocolbuffers/protobuf', 'python'): 'protobuf',
149149
_format_url('google/protorpc'): 'protorpc',
150-
_format_url('tensorflow/tensorflow', 'tensorflow/tools/pip_package'): \
150+
_format_url('tensorflow/tensorflow', 'tensorflow/tools/pip_package'):
151151
'tensorflow',
152152
_format_url('tensorflow/tensorflow',
153153
'tensorflow/contrib/tpu/profiler/pip_package'): 'tensorflow',
@@ -156,7 +156,7 @@ def _format_url(repo_name, setuppy_path=''):
156156
# grpc-google-iam-v1
157157
# grpcio
158158
# tensorboard - not sure what the build process is
159-
# _format_url('tensorflow/tensorboard', 'tensorboard/pip_package'): \
159+
# _format_url('tensorflow/tensorboard', 'tensorboard/pip_package'):
160160
# 'tensorboard',
161161
}
162162

0 commit comments

Comments
 (0)