Skip to content

Commit f20b41a

Browse files
fix: [Many APIs] fix ValueError in test__validate_universe_domain (#12283)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 604699565 Source-Link: https://togithub.com/googleapis/googleapis/commit/cd3eabf5968bbc91685e2eae8efb099e4d55bb5c Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/01f69ba7a13d59e6f45e243359b91a6e896221f8 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjAxZjY5YmE3YTEzZDU5ZTZmNDVlMjQzMzU5YjkxYTZlODk2MjIxZjgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvbWFpbnMvLk93bEJvdC55YW1sIiwiaCI6IjAxZjY5YmE3YTEzZDU5ZTZmNDVlMjQzMzU5YjkxYTZlODk2MjIxZjgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2Vjb250YWluZXIvLk93bEJvdC55YW1sIiwiaCI6IjAxZjY5YmE3YTEzZDU5ZTZmNDVlMjQzMzU5YjkxYTZlODk2MjIxZjgifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVkZ2VuZXR3b3JrLy5Pd2xCb3QueWFtbCIsImgiOiIwMWY2OWJhN2ExM2Q1OWU2ZjQ1ZTI0MzM1OWI5MWE2ZTg5NjIyMWY4In0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVudGVycHJpc2Vrbm93bGVkZ2VncmFwaC8uT3dsQm90LnlhbWwiLCJoIjoiMDFmNjliYTdhMTNkNTllNmY0NWUyNDMzNTliOTFhNmU4OTYyMjFmOCJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWVzc2VudGlhbC1jb250YWN0cy8uT3dsQm90LnlhbWwiLCJoIjoiMDFmNjliYTdhMTN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5YjkxYTZlODk2MjIxZjgifQ==
1 parent 38daeac commit f20b41a

File tree

24 files changed

+85
-84
lines changed

24 files changed

+85
-84
lines changed

packages/google-cloud-documentai/google/cloud/documentai_v1beta3/types/document_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,10 @@ class ListDocumentsRequest(proto.Message):
396396
https://google.aip.dev/160.
397397
398398
Currently support query strings are:
399+
------------------------------------
400+
401+
``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
399402
400-
- ``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
401403
- ``LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED``
402404
- ``DisplayName=\"file_name.pdf\"``
403405
- ``EntityType=abc/def``

packages/google-cloud-documentai/tests/unit/gapic/documentai_v1/test_document_processor_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
393393
# TODO: This is needed to cater for older versions of google-auth
394394
# Make this test unconditional once the minimum supported version of
395395
# google-auth becomes 2.23.0 or higher.
396-
google_auth_major, google_auth_minor, _ = [
397-
int(part) for part in google.auth.__version__.split(".")
396+
google_auth_major, google_auth_minor = [
397+
int(part) for part in google.auth.__version__.split(".")[0:2]
398398
]
399399
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
400400
credentials = ga_credentials.AnonymousCredentials()
@@ -412,8 +412,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
412412
#
413413
# TODO: Make this test unconditional once the minimum supported version of
414414
# google-api-core becomes 2.15.0 or higher.
415-
api_core_major, api_core_minor, _ = [
416-
int(part) for part in api_core_version.__version__.split(".")
415+
api_core_major, api_core_minor = [
416+
int(part) for part in api_core_version.__version__.split(".")[0:2]
417417
]
418418
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
419419
client = client_class(

packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta2/test_document_understanding_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
373373
# TODO: This is needed to cater for older versions of google-auth
374374
# Make this test unconditional once the minimum supported version of
375375
# google-auth becomes 2.23.0 or higher.
376-
google_auth_major, google_auth_minor, _ = [
377-
int(part) for part in google.auth.__version__.split(".")
376+
google_auth_major, google_auth_minor = [
377+
int(part) for part in google.auth.__version__.split(".")[0:2]
378378
]
379379
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
380380
credentials = ga_credentials.AnonymousCredentials()
@@ -392,8 +392,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
392392
#
393393
# TODO: Make this test unconditional once the minimum supported version of
394394
# google-api-core becomes 2.15.0 or higher.
395-
api_core_major, api_core_minor, _ = [
396-
int(part) for part in api_core_version.__version__.split(".")
395+
api_core_major, api_core_minor = [
396+
int(part) for part in api_core_version.__version__.split(".")[0:2]
397397
]
398398
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
399399
client = client_class(

packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_processor_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
393393
# TODO: This is needed to cater for older versions of google-auth
394394
# Make this test unconditional once the minimum supported version of
395395
# google-auth becomes 2.23.0 or higher.
396-
google_auth_major, google_auth_minor, _ = [
397-
int(part) for part in google.auth.__version__.split(".")
396+
google_auth_major, google_auth_minor = [
397+
int(part) for part in google.auth.__version__.split(".")[0:2]
398398
]
399399
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
400400
credentials = ga_credentials.AnonymousCredentials()
@@ -412,8 +412,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
412412
#
413413
# TODO: Make this test unconditional once the minimum supported version of
414414
# google-api-core becomes 2.15.0 or higher.
415-
api_core_major, api_core_minor, _ = [
416-
int(part) for part in api_core_version.__version__.split(".")
415+
api_core_major, api_core_minor = [
416+
int(part) for part in api_core_version.__version__.split(".")[0:2]
417417
]
418418
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
419419
client = client_class(

packages/google-cloud-documentai/tests/unit/gapic/documentai_v1beta3/test_document_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -352,8 +352,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
352352
# TODO: This is needed to cater for older versions of google-auth
353353
# Make this test unconditional once the minimum supported version of
354354
# google-auth becomes 2.23.0 or higher.
355-
google_auth_major, google_auth_minor, _ = [
356-
int(part) for part in google.auth.__version__.split(".")
355+
google_auth_major, google_auth_minor = [
356+
int(part) for part in google.auth.__version__.split(".")[0:2]
357357
]
358358
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
359359
credentials = ga_credentials.AnonymousCredentials()
@@ -371,8 +371,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
371371
#
372372
# TODO: Make this test unconditional once the minimum supported version of
373373
# google-api-core becomes 2.15.0 or higher.
374-
api_core_major, api_core_minor, _ = [
375-
int(part) for part in api_core_version.__version__.split(".")
374+
api_core_major, api_core_minor = [
375+
int(part) for part in api_core_version.__version__.split(".")[0:2]
376376
]
377377
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
378378
client = client_class(

packages/google-cloud-domains/tests/unit/gapic/domains_v1/test_domains.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
313313
# TODO: This is needed to cater for older versions of google-auth
314314
# Make this test unconditional once the minimum supported version of
315315
# google-auth becomes 2.23.0 or higher.
316-
google_auth_major, google_auth_minor, _ = [
317-
int(part) for part in google.auth.__version__.split(".")
316+
google_auth_major, google_auth_minor = [
317+
int(part) for part in google.auth.__version__.split(".")[0:2]
318318
]
319319
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
320320
credentials = ga_credentials.AnonymousCredentials()
@@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
332332
#
333333
# TODO: Make this test unconditional once the minimum supported version of
334334
# google-api-core becomes 2.15.0 or higher.
335-
api_core_major, api_core_minor, _ = [
336-
int(part) for part in api_core_version.__version__.split(".")
335+
api_core_major, api_core_minor = [
336+
int(part) for part in api_core_version.__version__.split(".")[0:2]
337337
]
338338
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
339339
client = client_class(

packages/google-cloud-domains/tests/unit/gapic/domains_v1beta1/test_domains.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
313313
# TODO: This is needed to cater for older versions of google-auth
314314
# Make this test unconditional once the minimum supported version of
315315
# google-auth becomes 2.23.0 or higher.
316-
google_auth_major, google_auth_minor, _ = [
317-
int(part) for part in google.auth.__version__.split(".")
316+
google_auth_major, google_auth_minor = [
317+
int(part) for part in google.auth.__version__.split(".")[0:2]
318318
]
319319
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
320320
credentials = ga_credentials.AnonymousCredentials()
@@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
332332
#
333333
# TODO: Make this test unconditional once the minimum supported version of
334334
# google-api-core becomes 2.15.0 or higher.
335-
api_core_major, api_core_minor, _ = [
336-
int(part) for part in api_core_version.__version__.split(".")
335+
api_core_major, api_core_minor = [
336+
int(part) for part in api_core_version.__version__.split(".")[0:2]
337337
]
338338
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
339339
client = client_class(

packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
345345
# TODO: This is needed to cater for older versions of google-auth
346346
# Make this test unconditional once the minimum supported version of
347347
# google-auth becomes 2.23.0 or higher.
348-
google_auth_major, google_auth_minor, _ = [
349-
int(part) for part in google.auth.__version__.split(".")
348+
google_auth_major, google_auth_minor = [
349+
int(part) for part in google.auth.__version__.split(".")[0:2]
350350
]
351351
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
352352
credentials = ga_credentials.AnonymousCredentials()
@@ -364,8 +364,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
364364
#
365365
# TODO: Make this test unconditional once the minimum supported version of
366366
# google-api-core becomes 2.15.0 or higher.
367-
api_core_major, api_core_minor, _ = [
368-
int(part) for part in api_core_version.__version__.split(".")
367+
api_core_major, api_core_minor = [
368+
int(part) for part in api_core_version.__version__.split(".")[0:2]
369369
]
370370
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
371371
client = client_class(

packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/types/resources.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,7 @@ class BgpPeerStatus(proto.Message):
972972
Time this session has been up.
973973
Format:
974974
975-
14 years, 51 weeks, 6 days, 23 hours, 59
975+
14 years, 51 weeks, 6 days, 23 hours, 59
976976
minutes, 59 seconds
977977
uptime_seconds (int):
978978
Time this session has been up, in seconds.

packages/google-cloud-edgenetwork/tests/unit/gapic/edgenetwork_v1/test_edge_network.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
328328
# TODO: This is needed to cater for older versions of google-auth
329329
# Make this test unconditional once the minimum supported version of
330330
# google-auth becomes 2.23.0 or higher.
331-
google_auth_major, google_auth_minor, _ = [
332-
int(part) for part in google.auth.__version__.split(".")
331+
google_auth_major, google_auth_minor = [
332+
int(part) for part in google.auth.__version__.split(".")[0:2]
333333
]
334334
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
335335
credentials = ga_credentials.AnonymousCredentials()
@@ -347,8 +347,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
347347
#
348348
# TODO: Make this test unconditional once the minimum supported version of
349349
# google-api-core becomes 2.15.0 or higher.
350-
api_core_major, api_core_minor, _ = [
351-
int(part) for part in api_core_version.__version__.split(".")
350+
api_core_major, api_core_minor = [
351+
int(part) for part in api_core_version.__version__.split(".")[0:2]
352352
]
353353
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
354354
client = client_class(

0 commit comments

Comments
 (0)