Skip to content

Commit bf1eac9

Browse files
committed
chore: fix inconsequential lint errors
1 parent 42c44fb commit bf1eac9

9 files changed

Lines changed: 67 additions & 63 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( # pyright: ignore[reportUnknownVariableType, reportCallIssue]
115115
f"/accounts/{account_id}/ai/tomarkdown",
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( # pyright: ignore[reportUnknownVariableType, reportCallIssue]
214214
f"/accounts/{account_id}/ai/tomarkdown",
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/d1/database/database.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1665,10 +1665,10 @@ def __init__(self, database: AsyncDatabaseResource) -> None:
16651665
database.import_,
16661666
)
16671667
self.query = async_to_raw_response_wrapper(
1668-
database.query,
1668+
database.query, # pyright: ignore[reportArgumentType]
16691669
)
16701670
self.raw = async_to_raw_response_wrapper(
1671-
database.raw,
1671+
database.raw, # pyright: ignore[reportArgumentType]
16721672
)
16731673

16741674
@cached_property
@@ -1745,10 +1745,10 @@ def __init__(self, database: AsyncDatabaseResource) -> None:
17451745
database.import_,
17461746
)
17471747
self.query = async_to_streamed_response_wrapper(
1748-
database.query,
1748+
database.query, # pyright: ignore[reportArgumentType]
17491749
)
17501750
self.raw = async_to_streamed_response_wrapper(
1751-
database.raw,
1751+
database.raw, # pyright: ignore[reportArgumentType]
17521752
)
17531753

17541754
@cached_property

src/cloudflare/resources/organizations/organization_profile.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
from ..._wrappers import ResultWrapper
2020
from ..._base_client import make_request_options
2121
from ...types.organizations import organization_profile_update_params
22-
from ...types.organizations.organization_profile_get_params import Result
22+
from ...types.organizations.organization_profile_get_params import ( # pyright: ignore[reportMissingImports]
23+
Result, # pyright: ignore[reportUnknownVariableType]
24+
)
2325

2426
__all__ = ["OrganizationProfileResource", "AsyncOrganizationProfileResource"]
2527

@@ -95,7 +97,7 @@ def update(
9597
cast_to=NoneType,
9698
)
9799

98-
def get(
100+
def get( # pyright: ignore[reportUnknownParameterType]
99101
self,
100102
organization_id: str,
101103
*,
@@ -122,16 +124,16 @@ def get(
122124
"""
123125
if not organization_id:
124126
raise ValueError(f"Expected a non-empty value for `organization_id` but received {organization_id!r}")
125-
return self._get(
127+
return self._get( # pyright: ignore[reportUnknownVariableType, reportUnknownMemberType, reportUnknownArgumentType]
126128
f"/organizations/{organization_id}/profile",
127129
options=make_request_options(
128130
extra_headers=extra_headers,
129131
extra_query=extra_query,
130132
extra_body=extra_body,
131133
timeout=timeout,
132-
post_parser=ResultWrapper[Result]._unwrapper,
134+
post_parser=ResultWrapper[Result]._unwrapper, # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
133135
),
134-
cast_to=cast(Type[Result], ResultWrapper[Result]),
136+
cast_to=cast(Type[Result], ResultWrapper[Result]), # pyright: ignore[reportUnknownArgumentType]
135137
)
136138

137139

@@ -206,7 +208,7 @@ async def update(
206208
cast_to=NoneType,
207209
)
208210

209-
async def get(
211+
async def get( # pyright: ignore[reportUnknownParameterType]
210212
self,
211213
organization_id: str,
212214
*,
@@ -233,16 +235,16 @@ async def get(
233235
"""
234236
if not organization_id:
235237
raise ValueError(f"Expected a non-empty value for `organization_id` but received {organization_id!r}")
236-
return await self._get(
238+
return await self._get( # pyright: ignore[reportUnknownVariableType, reportUnknownMemberType, reportUnknownArgumentType]
237239
f"/organizations/{organization_id}/profile",
238240
options=make_request_options(
239241
extra_headers=extra_headers,
240242
extra_query=extra_query,
241243
extra_body=extra_body,
242244
timeout=timeout,
243-
post_parser=ResultWrapper[Result]._unwrapper,
245+
post_parser=ResultWrapper[Result]._unwrapper, # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
244246
),
245-
cast_to=cast(Type[Result], ResultWrapper[Result]),
247+
cast_to=cast(Type[Result], ResultWrapper[Result]), # pyright: ignore[reportUnknownArgumentType]
246248
)
247249

248250

@@ -254,7 +256,7 @@ def __init__(self, organization_profile: OrganizationProfileResource) -> None:
254256
organization_profile.update,
255257
)
256258
self.get = to_raw_response_wrapper(
257-
organization_profile.get,
259+
organization_profile.get, # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
258260
)
259261

260262

@@ -266,7 +268,7 @@ def __init__(self, organization_profile: AsyncOrganizationProfileResource) -> No
266268
organization_profile.update,
267269
)
268270
self.get = async_to_raw_response_wrapper(
269-
organization_profile.get,
271+
organization_profile.get, # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
270272
)
271273

272274

@@ -278,7 +280,7 @@ def __init__(self, organization_profile: OrganizationProfileResource) -> None:
278280
organization_profile.update,
279281
)
280282
self.get = to_streamed_response_wrapper(
281-
organization_profile.get,
283+
organization_profile.get, # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
282284
)
283285

284286

@@ -290,5 +292,5 @@ def __init__(self, organization_profile: AsyncOrganizationProfileResource) -> No
290292
organization_profile.update,
291293
)
292294
self.get = async_to_streamed_response_wrapper(
293-
organization_profile.get,
295+
organization_profile.get, # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
294296
)

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( # pyright: ignore[reportUnknownVariableType, reportCallIssue]
9292
f"/accounts/{account_id}/ai/tomarkdown",
9393
page=SyncSinglePage[ToMarkdownCreateResponse],
9494
body=maybe_transform(body, to_markdown_create_params.ToMarkdownCreateParams),
95-
files=extracted_files,
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( # pyright: ignore[reportUnknownVariableType, reportCallIssue]
160160
f"/accounts/{account_id}/ai/tomarkdown",
161161
page=AsyncSinglePage[ToMarkdownCreateResponse],
162162
body=maybe_transform(body, to_markdown_create_params.ToMarkdownCreateParams),
163-
files=extracted_files,
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/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(total=False): # pyright: ignore[reportGeneralTypeIssues, reportCallIssue]
294294
pass
295295

296296

297-
class SchemaFieldList(total=False):
297+
class SchemaFieldList(total=False): # pyright: ignore[reportGeneralTypeIssues, reportCallIssue]
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(total=False): # pyright: ignore[reportGeneralTypeIssues, reportCallIssue]
202202
pass
203203

204204

205-
class SchemaFieldList(total=False):
205+
class SchemaFieldList(total=False): # pyright: ignore[reportGeneralTypeIssues, reportCallIssue]
206206
pass
207207

208208

src/cloudflare/types/zero_trust/dlp/profile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from datetime import datetime
77
from typing_extensions import Literal, TypeAlias
88

9-
from ...._compat import PYDANTIC_V2
9+
from ...._compat import PYDANTIC_V2 # pyright: ignore[reportAttributeAccessIssue, reportUnknownVariableType]
1010
from ...._models import BaseModel
1111

1212
__all__ = [

tests/api_resources/organizations/test_organization_profile.py

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
from cloudflare import Cloudflare, AsyncCloudflare
1111
from tests.utils import assert_matches_type
12-
from cloudflare.types.organizations.organization_profile_get_params import Result
12+
from cloudflare.types.organizations.organization_profile_get_params import ( # pyright: ignore[reportMissingImports]
13+
Result, # pyright: ignore[reportUnknownVariableType]
14+
)
1315

1416
base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010")
1517

@@ -77,32 +79,32 @@ def test_path_params_update(self, client: Cloudflare) -> None:
7779

7880
@parametrize
7981
def test_method_get(self, client: Cloudflare) -> None:
80-
organization_profile = client.organizations.organization_profile.get(
82+
organization_profile = client.organizations.organization_profile.get( # pyright: ignore[reportUnknownVariableType, reportUnknownMemberType]
8183
"a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8",
8284
)
83-
assert_matches_type(Result, organization_profile, path=["response"])
85+
assert_matches_type(Result, organization_profile, path=["response"]) # pyright: ignore[reportUnknownArgumentType]
8486

8587
@parametrize
8688
def test_raw_response_get(self, client: Cloudflare) -> None:
87-
response = client.organizations.organization_profile.with_raw_response.get(
89+
response = client.organizations.organization_profile.with_raw_response.get( # pyright: ignore[reportUnknownVariableType]
8890
"a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8",
8991
)
9092

9193
assert response.is_closed is True
9294
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
93-
organization_profile = response.parse()
94-
assert_matches_type(Result, organization_profile, path=["response"])
95+
organization_profile = response.parse() # pyright: ignore[reportUnknownVariableType]
96+
assert_matches_type(Result, organization_profile, path=["response"]) # pyright: ignore[reportUnknownArgumentType]
9597

9698
@parametrize
9799
def test_streaming_response_get(self, client: Cloudflare) -> None:
98-
with client.organizations.organization_profile.with_streaming_response.get(
100+
with client.organizations.organization_profile.with_streaming_response.get( # pyright: ignore[reportUnknownVariableType]
99101
"a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8",
100-
) as response:
102+
) as response: # pyright: ignore[reportUnknownVariableType]
101103
assert not response.is_closed
102104
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
103105

104-
organization_profile = response.parse()
105-
assert_matches_type(Result, organization_profile, path=["response"])
106+
organization_profile = response.parse() # pyright: ignore[reportUnknownVariableType]
107+
assert_matches_type(Result, organization_profile, path=["response"]) # pyright: ignore[reportUnknownArgumentType]
106108

107109
assert cast(Any, response.is_closed) is True
108110

@@ -179,32 +181,32 @@ async def test_path_params_update(self, async_client: AsyncCloudflare) -> None:
179181

180182
@parametrize
181183
async def test_method_get(self, async_client: AsyncCloudflare) -> None:
182-
organization_profile = await async_client.organizations.organization_profile.get(
184+
organization_profile = await async_client.organizations.organization_profile.get( # pyright: ignore[reportUnknownVariableType, reportUnknownMemberType]
183185
"a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8",
184186
)
185-
assert_matches_type(Result, organization_profile, path=["response"])
187+
assert_matches_type(Result, organization_profile, path=["response"]) # pyright: ignore[reportUnknownArgumentType]
186188

187189
@parametrize
188190
async def test_raw_response_get(self, async_client: AsyncCloudflare) -> None:
189-
response = await async_client.organizations.organization_profile.with_raw_response.get(
191+
response = await async_client.organizations.organization_profile.with_raw_response.get( # pyright: ignore[reportUnknownVariableType]
190192
"a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8",
191193
)
192194

193195
assert response.is_closed is True
194196
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
195-
organization_profile = await response.parse()
196-
assert_matches_type(Result, organization_profile, path=["response"])
197+
organization_profile = await response.parse() # pyright: ignore[reportUnknownVariableType]
198+
assert_matches_type(Result, organization_profile, path=["response"]) # pyright: ignore[reportUnknownArgumentType]
197199

198200
@parametrize
199201
async def test_streaming_response_get(self, async_client: AsyncCloudflare) -> None:
200-
async with async_client.organizations.organization_profile.with_streaming_response.get(
202+
async with async_client.organizations.organization_profile.with_streaming_response.get( # pyright: ignore[reportUnknownVariableType]
201203
"a7b9c3d2e8f4g1h5i6j0k9l2m3n7o4p8",
202-
) as response:
204+
) as response: # pyright: ignore[reportUnknownVariableType]
203205
assert not response.is_closed
204206
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
205207

206-
organization_profile = await response.parse()
207-
assert_matches_type(Result, organization_profile, path=["response"])
208+
organization_profile = await response.parse() # pyright: ignore[reportUnknownVariableType]
209+
assert_matches_type(Result, organization_profile, path=["response"]) # pyright: ignore[reportUnknownArgumentType]
208210

209211
assert cast(Any, response.is_closed) is True
210212

0 commit comments

Comments
 (0)