Skip to content

Commit

Permalink
fix: fix lint error
Browse files Browse the repository at this point in the history
fix lint error
fix lint command

Signed-off-by: Silpi Dhua <silpidhua@gmail.com>
  • Loading branch information
silpidhua committed Mar 16, 2023
1 parent 6b5ba78 commit fe78649
Show file tree
Hide file tree
Showing 11 changed files with 672 additions and 1,763 deletions.
60 changes: 21 additions & 39 deletions examples/test_ibm_analytics_engine_api_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,9 @@ def test_get_analytics_engine_by_id_example(self):
print("\nget_analytics_engine_by_id() result:")
# begin-getAnalyticsEngineById

analytics_engine = (
ibm_analytics_engine_api_service.get_analytics_engine_by_id(
instance_guid="testString"
).get_result()
)
analytics_engine = ibm_analytics_engine_api_service.get_analytics_engine_by_id(
instance_guid="testString"
).get_result()

print(json.dumps(analytics_engine, indent=2))

Expand All @@ -125,11 +123,9 @@ def test_get_analytics_engine_state_by_id_example(self):
print("\nget_analytics_engine_state_by_id() result:")
# begin-getAnalyticsEngineStateById

analytics_engine_state = (
ibm_analytics_engine_api_service.get_analytics_engine_state_by_id(
instance_guid="testString"
).get_result()
)
analytics_engine_state = ibm_analytics_engine_api_service.get_analytics_engine_state_by_id(
instance_guid="testString"
).get_result()

print(json.dumps(analytics_engine_state, indent=2))

Expand Down Expand Up @@ -176,9 +172,7 @@ def test_get_all_customization_requests_example(self):
# begin-getAllCustomizationRequests

list_analytics_engine_customization_request_collection_item = (
ibm_analytics_engine_api_service.get_all_customization_requests(
instance_guid="testString"
).get_result()
ibm_analytics_engine_api_service.get_all_customization_requests(instance_guid="testString").get_result()
)

print(
Expand Down Expand Up @@ -226,11 +220,9 @@ def test_resize_cluster_example(self):

resize_cluster_request_model = {}

analytics_engine_resize_cluster_response = (
ibm_analytics_engine_api_service.resize_cluster(
instance_guid="testString", body=resize_cluster_request_model
).get_result()
)
analytics_engine_resize_cluster_response = ibm_analytics_engine_api_service.resize_cluster(
instance_guid="testString", body=resize_cluster_request_model
).get_result()

print(json.dumps(analytics_engine_resize_cluster_response, indent=2))

Expand All @@ -248,15 +240,11 @@ def test_reset_cluster_password_example(self):
print("\nreset_cluster_password() result:")
# begin-resetClusterPassword

analytics_engine_reset_cluster_password_response = (
ibm_analytics_engine_api_service.reset_cluster_password(
instance_guid="testString"
).get_result()
)
analytics_engine_reset_cluster_password_response = ibm_analytics_engine_api_service.reset_cluster_password(
instance_guid="testString"
).get_result()

print(
json.dumps(analytics_engine_reset_cluster_password_response, indent=2)
)
print(json.dumps(analytics_engine_reset_cluster_password_response, indent=2))

# end-resetClusterPassword

Expand Down Expand Up @@ -307,11 +295,9 @@ def test_get_logging_config_example(self):
print("\nget_logging_config() result:")
# begin-getLoggingConfig

analytics_engine_logging_config_details = (
ibm_analytics_engine_api_service.get_logging_config(
instance_guid="testString"
).get_result()
)
analytics_engine_logging_config_details = ibm_analytics_engine_api_service.get_logging_config(
instance_guid="testString"
).get_result()

print(json.dumps(analytics_engine_logging_config_details, indent=2))

Expand All @@ -329,11 +315,9 @@ def test_update_private_endpoint_whitelist_example(self):
print("\nupdate_private_endpoint_whitelist() result:")
# begin-updatePrivateEndpointWhitelist

analytics_engine_whitelist_response = (
ibm_analytics_engine_api_service.update_private_endpoint_whitelist(
instance_guid="testString", ip_ranges=["testString"], action="add"
).get_result()
)
analytics_engine_whitelist_response = ibm_analytics_engine_api_service.update_private_endpoint_whitelist(
instance_guid="testString", ip_ranges=["testString"], action="add"
).get_result()

print(json.dumps(analytics_engine_whitelist_response, indent=2))

Expand All @@ -350,9 +334,7 @@ def test_delete_logging_config_example(self):
try:
# begin-deleteLoggingConfig

response = ibm_analytics_engine_api_service.delete_logging_config(
instance_guid="testString"
)
response = ibm_analytics_engine_api_service.delete_logging_config(instance_guid="testString")

# end-deleteLoggingConfig
print(
Expand Down
38 changes: 15 additions & 23 deletions examples/test_ibm_analytics_engine_api_v3_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,10 @@ def test_update_instance_home_credentials_example(self):
print("\nupdate_instance_home_credentials() result:")
# begin-update_instance_home_credentials

response = (
ibm_analytics_engine_api_service.update_instance_home_credentials(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
hmac_access_key="b9****************************4b",
hmac_secret_key="fa********************************************8a",
)
response = ibm_analytics_engine_api_service.update_instance_home_credentials(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
hmac_access_key="b9****************************4b",
hmac_secret_key="fa********************************************8a",
)
instance_home_response = response.get_result()

Expand Down Expand Up @@ -195,14 +193,12 @@ def test_replace_instance_default_configs_example(self):
print("\nreplace_instance_default_configs() result:")
# begin-replace_instance_default_configs

response = (
ibm_analytics_engine_api_service.replace_instance_default_configs(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
body={
"spark.driver.memory": "8G",
"spark.driver.cores": "2",
},
)
response = ibm_analytics_engine_api_service.replace_instance_default_configs(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
body={
"spark.driver.memory": "8G",
"spark.driver.cores": "2",
},
)
instance_default_configs = response.get_result()

Expand Down Expand Up @@ -268,11 +264,9 @@ def test_replace_instance_default_runtime_example(self):
print("\nreplace_instance_default_runtime() result:")
# begin-replace_instance_default_runtime

response = (
ibm_analytics_engine_api_service.replace_instance_default_runtime(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
spark_version="3.3",
)
response = ibm_analytics_engine_api_service.replace_instance_default_runtime(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
spark_version="3.3",
)
runtime = response.get_result()

Expand Down Expand Up @@ -389,10 +383,8 @@ def test_get_current_resource_consumption_example(self):
print("\nget_current_resource_consumption() result:")
# begin-get_current_resource_consumption

response = (
ibm_analytics_engine_api_service.get_current_resource_consumption(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
)
response = ibm_analytics_engine_api_service.get_current_resource_consumption(
instance_id="e64c907a-e82f-46fd-addc-ccfafbd28b09",
)
current_resource_consumption_response = response.get_result()

Expand Down
11 changes: 4 additions & 7 deletions iaesdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# coding: utf-8
# Copyright 2019 IBM All Rights Reserved.
# Copyright 2019, 2020 IBM All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,12 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ibm_cloud_sdk_core import (
IAMTokenManager,
DetailedResponse,
BaseService,
ApiException,
)
"""Python client library for the IBM Cloud MySDK Services"""

from ibm_cloud_sdk_core import IAMTokenManager, DetailedResponse, BaseService, ApiException

from .common import get_sdk_headers
from .version import __version__
Expand Down
Loading

0 comments on commit fe78649

Please sign in to comment.