Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: [Many APIs] fix ValueError in test__validate_universe_domain #12283

Merged
merged 4 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,10 @@ class ListDocumentsRequest(proto.Message):
https://google.aip.dev/160.

Currently support query strings are:
------------------------------------

``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``

- ``SplitType=DATASET_SPLIT_TEST|DATASET_SPLIT_TRAIN|DATASET_SPLIT_UNASSIGNED``
- ``LabelingState=DOCUMENT_LABELED|DOCUMENT_UNLABELED|DOCUMENT_AUTO_LABELED``
- ``DisplayName=\"file_name.pdf\"``
- ``EntityType=abc/def``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -412,8 +412,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -392,8 +392,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -412,8 +412,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -371,8 +371,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,8 +345,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -364,8 +364,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ class BgpPeerStatus(proto.Message):
Time this session has been up.
Format:

14 years, 51 weeks, 6 days, 23 hours, 59
14 years, 51 weeks, 6 days, 23 hours, 59
minutes, 59 seconds
uptime_seconds (int):
Time this session has been up, in seconds.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -347,8 +347,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ class Options(proto.Message):
- schema.org/addressLocality
- schema.org/addressRegion
- schema.org/addressCountry

Warning: processing will no longer be
regionalized!
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -402,8 +402,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -379,8 +379,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -327,8 +327,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -351,8 +351,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -393,8 +393,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
# TODO: This is needed to cater for older versions of google-auth
# Make this test unconditional once the minimum supported version of
# google-auth becomes 2.23.0 or higher.
google_auth_major, google_auth_minor, _ = [
int(part) for part in google.auth.__version__.split(".")
google_auth_major, google_auth_minor = [
int(part) for part in google.auth.__version__.split(".")[0:2]
]
if google_auth_major > 2 or (google_auth_major == 2 and google_auth_minor >= 23):
credentials = ga_credentials.AnonymousCredentials()
Expand All @@ -396,8 +396,8 @@ def test__validate_universe_domain(client_class, transport_class, transport_name
#
# TODO: Make this test unconditional once the minimum supported version of
# google-api-core becomes 2.15.0 or higher.
api_core_major, api_core_minor, _ = [
int(part) for part in api_core_version.__version__.split(".")
api_core_major, api_core_minor = [
int(part) for part in api_core_version.__version__.split(".")[0:2]
]
if api_core_major > 2 or (api_core_major == 2 and api_core_minor >= 15):
client = client_class(
Expand Down