Skip to content

Commit fed88d6

Browse files
committed
fix: resolve pre-existing codegen type errors
- Add missing Required import in ai/finetunes/asset_create_params.py - Add TypedDict base class to pipelines SchemaFieldStruct/SchemaFieldList stubs - Add type suppression comments for files= kwarg on get_api_list() in ai/to_markdown.py and radar/ai/to_markdown.py - Re-create missing organization_profile_get_params.py type alias module - Add OrganizationProfile export to types/organizations/__init__.py
1 parent f22897e commit fed88d6

7 files changed

Lines changed: 25 additions & 13 deletions

File tree

src/cloudflare/resources/ai/to_markdown.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ def transform(
111111
# sent to the server will contain a `boundary` parameter, e.g.
112112
# multipart/form-data; boundary=---abc--
113113
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
114-
return self._get_api_list(
114+
return self._get_api_list( # type: ignore[call-arg]
115115
path_template("/accounts/{account_id}/ai/tomarkdown", account_id=account_id),
116116
page=SyncSinglePage[ToMarkdownTransformResponse],
117117
body=maybe_transform(body, to_markdown_transform_params.ToMarkdownTransformParams),
118-
files=files,
118+
files=files, # pyright: ignore[reportCallIssue]
119119
options=make_request_options(
120120
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
121121
),
@@ -210,11 +210,11 @@ def transform(
210210
# sent to the server will contain a `boundary` parameter, e.g.
211211
# multipart/form-data; boundary=---abc--
212212
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
213-
return self._get_api_list(
213+
return self._get_api_list( # type: ignore[call-arg]
214214
path_template("/accounts/{account_id}/ai/tomarkdown", account_id=account_id),
215215
page=AsyncSinglePage[ToMarkdownTransformResponse],
216216
body=maybe_transform(body, to_markdown_transform_params.ToMarkdownTransformParams),
217-
files=files,
217+
files=files, # pyright: ignore[reportCallIssue]
218218
options=make_request_options(
219219
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
220220
),

src/cloudflare/resources/radar/ai/to_markdown.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ def create(
8888
# sent to the server will contain a `boundary` parameter, e.g.
8989
# multipart/form-data; boundary=---abc--
9090
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
91-
return self._get_api_list(
91+
return self._get_api_list( # type: ignore[call-arg]
9292
path_template("/accounts/{account_id}/ai/tomarkdown", account_id=account_id),
9393
page=SyncSinglePage[ToMarkdownCreateResponse],
9494
body=maybe_transform(body, to_markdown_create_params.ToMarkdownCreateParams),
95-
files=extracted_files, # pyright: ignore[reportCallIssue] # type: ignore[call-arg]
95+
files=extracted_files, # pyright: ignore[reportCallIssue]
9696
options=make_request_options(
9797
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
9898
),
@@ -156,11 +156,11 @@ def create(
156156
# sent to the server will contain a `boundary` parameter, e.g.
157157
# multipart/form-data; boundary=---abc--
158158
extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})}
159-
return self._get_api_list(
159+
return self._get_api_list( # type: ignore[call-arg]
160160
path_template("/accounts/{account_id}/ai/tomarkdown", account_id=account_id),
161161
page=AsyncSinglePage[ToMarkdownCreateResponse],
162162
body=maybe_transform(body, to_markdown_create_params.ToMarkdownCreateParams),
163-
files=extracted_files, # pyright: ignore[reportCallIssue] # type: ignore[call-arg]
163+
files=extracted_files, # pyright: ignore[reportCallIssue]
164164
options=make_request_options(
165165
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
166166
),

src/cloudflare/types/ai/finetunes/asset_create_params.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing_extensions import TypedDict
5+
from typing_extensions import Required, TypedDict
66

77
from ...._types import FileTypes
88

src/cloudflare/types/organizations/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from __future__ import annotations
44

55
from .organization import Organization as Organization
6+
from .organization_profile import OrganizationProfile as OrganizationProfile
67
from .organization_list_params import OrganizationListParams as OrganizationListParams
78
from .organization_create_params import OrganizationCreateParams as OrganizationCreateParams
89
from .organization_update_params import OrganizationUpdateParams as OrganizationUpdateParams
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing_extensions import TypeAlias
6+
7+
from .organization_profile import OrganizationProfile
8+
9+
__all__ = ["Result"]
10+
11+
Result: TypeAlias = OrganizationProfile

src/cloudflare/types/pipelines/sink_create_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,11 +290,11 @@ class SchemaFieldJson(TypedDict, total=False):
290290
sql_name: str
291291

292292

293-
class SchemaFieldStruct(total=False):
293+
class SchemaFieldStruct(TypedDict, total=False):
294294
pass
295295

296296

297-
class SchemaFieldList(total=False):
297+
class SchemaFieldList(TypedDict, total=False):
298298
pass
299299

300300

src/cloudflare/types/pipelines/stream_create_params.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ class SchemaFieldJson(TypedDict, total=False):
198198
sql_name: str
199199

200200

201-
class SchemaFieldStruct(total=False):
201+
class SchemaFieldStruct(TypedDict, total=False):
202202
pass
203203

204204

205-
class SchemaFieldList(total=False):
205+
class SchemaFieldList(TypedDict, total=False):
206206
pass
207207

208208

0 commit comments

Comments
 (0)