Skip to content

Commit 2fbb1d4

Browse files
chore(client): rename cloud_polling_* opts to polling_*
1 parent 9d56917 commit 2fbb1d4

2 files changed

Lines changed: 30 additions & 30 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 655
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore/gcore-654176da11454546a55cd34a004f89ee9133d144f2f3d6f1b23701e85d645fb8.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/gcore/gcore-a75fe919f707b72deefe3d4fd7318b73b6cb6ab7305dcda67b9c72cb6cfd5325.yml
33
openapi_spec_hash: a96c0414ee2343a62ea3e4938bbccbd0
4-
config_hash: 88e4af508ede520a45a0563d9cf077cc
4+
config_hash: 3d00790fb3a2bad4e5d5eb2e02645385

src/gcore/_client.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ class Gcore(SyncAPIClient):
5555
api_key: str
5656
cloud_project_id: int | None
5757
cloud_region_id: int | None
58-
cloud_polling_interval_seconds: int | None
59-
cloud_polling_timeout_seconds: int | None
58+
polling_interval_seconds: int | None
59+
polling_timeout_seconds: int | None
6060

6161
def __init__(
6262
self,
6363
*,
6464
api_key: str | None = None,
6565
cloud_project_id: int | None = None,
6666
cloud_region_id: int | None = None,
67-
cloud_polling_interval_seconds: int | None = 3,
68-
cloud_polling_timeout_seconds: int | None = 7200,
67+
polling_interval_seconds: int | None = 3,
68+
polling_timeout_seconds: int | None = 7200,
6969
base_url: str | httpx.URL | None = None,
7070
timeout: float | Timeout | None | NotGiven = not_given,
7171
max_retries: int = DEFAULT_MAX_RETRIES,
@@ -108,13 +108,13 @@ def __init__(
108108
cloud_region_id = maybe_coerce_integer(os.environ.get("GCORE_CLOUD_REGION_ID"))
109109
self.cloud_region_id = cloud_region_id
110110

111-
if cloud_polling_interval_seconds is None:
112-
cloud_polling_interval_seconds = 3
113-
self.cloud_polling_interval_seconds = cloud_polling_interval_seconds
111+
if polling_interval_seconds is None:
112+
polling_interval_seconds = 3
113+
self.polling_interval_seconds = polling_interval_seconds
114114

115-
if cloud_polling_timeout_seconds is None:
116-
cloud_polling_timeout_seconds = 7200
117-
self.cloud_polling_timeout_seconds = cloud_polling_timeout_seconds
115+
if polling_timeout_seconds is None:
116+
polling_timeout_seconds = 7200
117+
self.polling_timeout_seconds = polling_timeout_seconds
118118

119119
if base_url is None:
120120
base_url = os.environ.get("GCORE_BASE_URL")
@@ -233,8 +233,8 @@ def copy(
233233
api_key: str | None = None,
234234
cloud_project_id: int | None = None,
235235
cloud_region_id: int | None = None,
236-
cloud_polling_interval_seconds: int | None = None,
237-
cloud_polling_timeout_seconds: int | None = None,
236+
polling_interval_seconds: int | None = None,
237+
polling_timeout_seconds: int | None = None,
238238
base_url: str | httpx.URL | None = None,
239239
timeout: float | Timeout | None | NotGiven = not_given,
240240
http_client: httpx.Client | None = None,
@@ -271,8 +271,8 @@ def copy(
271271
api_key=api_key or self.api_key,
272272
cloud_project_id=cloud_project_id or self.cloud_project_id,
273273
cloud_region_id=cloud_region_id or self.cloud_region_id,
274-
cloud_polling_interval_seconds=cloud_polling_interval_seconds or self.cloud_polling_interval_seconds,
275-
cloud_polling_timeout_seconds=cloud_polling_timeout_seconds or self.cloud_polling_timeout_seconds,
274+
polling_interval_seconds=polling_interval_seconds or self.polling_interval_seconds,
275+
polling_timeout_seconds=polling_timeout_seconds or self.polling_timeout_seconds,
276276
base_url=base_url or self.base_url,
277277
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
278278
http_client=http_client,
@@ -343,17 +343,17 @@ class AsyncGcore(AsyncAPIClient):
343343
api_key: str
344344
cloud_project_id: int | None
345345
cloud_region_id: int | None
346-
cloud_polling_interval_seconds: int | None
347-
cloud_polling_timeout_seconds: int | None
346+
polling_interval_seconds: int | None
347+
polling_timeout_seconds: int | None
348348

349349
def __init__(
350350
self,
351351
*,
352352
api_key: str | None = None,
353353
cloud_project_id: int | None = None,
354354
cloud_region_id: int | None = None,
355-
cloud_polling_interval_seconds: int | None = 3,
356-
cloud_polling_timeout_seconds: int | None = 7200,
355+
polling_interval_seconds: int | None = 3,
356+
polling_timeout_seconds: int | None = 7200,
357357
base_url: str | httpx.URL | None = None,
358358
timeout: float | Timeout | None | NotGiven = not_given,
359359
max_retries: int = DEFAULT_MAX_RETRIES,
@@ -396,13 +396,13 @@ def __init__(
396396
cloud_region_id = maybe_coerce_integer(os.environ.get("GCORE_CLOUD_REGION_ID"))
397397
self.cloud_region_id = cloud_region_id
398398

399-
if cloud_polling_interval_seconds is None:
400-
cloud_polling_interval_seconds = 3
401-
self.cloud_polling_interval_seconds = cloud_polling_interval_seconds
399+
if polling_interval_seconds is None:
400+
polling_interval_seconds = 3
401+
self.polling_interval_seconds = polling_interval_seconds
402402

403-
if cloud_polling_timeout_seconds is None:
404-
cloud_polling_timeout_seconds = 7200
405-
self.cloud_polling_timeout_seconds = cloud_polling_timeout_seconds
403+
if polling_timeout_seconds is None:
404+
polling_timeout_seconds = 7200
405+
self.polling_timeout_seconds = polling_timeout_seconds
406406

407407
if base_url is None:
408408
base_url = os.environ.get("GCORE_BASE_URL")
@@ -521,8 +521,8 @@ def copy(
521521
api_key: str | None = None,
522522
cloud_project_id: int | None = None,
523523
cloud_region_id: int | None = None,
524-
cloud_polling_interval_seconds: int | None = None,
525-
cloud_polling_timeout_seconds: int | None = None,
524+
polling_interval_seconds: int | None = None,
525+
polling_timeout_seconds: int | None = None,
526526
base_url: str | httpx.URL | None = None,
527527
timeout: float | Timeout | None | NotGiven = not_given,
528528
http_client: httpx.AsyncClient | None = None,
@@ -559,8 +559,8 @@ def copy(
559559
api_key=api_key or self.api_key,
560560
cloud_project_id=cloud_project_id or self.cloud_project_id,
561561
cloud_region_id=cloud_region_id or self.cloud_region_id,
562-
cloud_polling_interval_seconds=cloud_polling_interval_seconds or self.cloud_polling_interval_seconds,
563-
cloud_polling_timeout_seconds=cloud_polling_timeout_seconds or self.cloud_polling_timeout_seconds,
562+
polling_interval_seconds=polling_interval_seconds or self.polling_interval_seconds,
563+
polling_timeout_seconds=polling_timeout_seconds or self.polling_timeout_seconds,
564564
base_url=base_url or self.base_url,
565565
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
566566
http_client=http_client,

0 commit comments

Comments
 (0)