Skip to content

Commit 2fe9a70

Browse files
chore(internal): remove some duplicated imports (#2272)
1 parent cf4cf84 commit 2fe9a70

File tree

77 files changed

+648
-790
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+648
-790
lines changed

src/cloudflare/resources/accounts/accounts.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@
1515
RolesResourceWithStreamingResponse,
1616
AsyncRolesResourceWithStreamingResponse,
1717
)
18-
from .tokens import (
19-
TokensResource,
20-
AsyncTokensResource,
21-
TokensResourceWithRawResponse,
22-
AsyncTokensResourceWithRawResponse,
23-
TokensResourceWithStreamingResponse,
24-
AsyncTokensResourceWithStreamingResponse,
25-
)
2618
from .members import (
2719
MembersResource,
2820
AsyncMembersResource,
@@ -54,7 +46,14 @@
5446
SubscriptionsResourceWithStreamingResponse,
5547
AsyncSubscriptionsResourceWithStreamingResponse,
5648
)
57-
from .tokens.tokens import TokensResource, AsyncTokensResource
49+
from .tokens.tokens import (
50+
TokensResource,
51+
AsyncTokensResource,
52+
TokensResourceWithRawResponse,
53+
AsyncTokensResourceWithRawResponse,
54+
TokensResourceWithStreamingResponse,
55+
AsyncTokensResourceWithStreamingResponse,
56+
)
5857
from ..._base_client import AsyncPaginator, make_request_options
5958
from ...types.accounts import account_list_params, account_create_params, account_update_params
6059
from ...types.accounts.account import Account

src/cloudflare/resources/addressing/addressing.py

+11-15
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,6 @@
22

33
from __future__ import annotations
44

5-
from .prefixes import (
6-
PrefixesResource,
7-
AsyncPrefixesResource,
8-
PrefixesResourceWithRawResponse,
9-
AsyncPrefixesResourceWithRawResponse,
10-
PrefixesResourceWithStreamingResponse,
11-
AsyncPrefixesResourceWithStreamingResponse,
12-
)
135
from .services import (
146
ServicesResource,
157
AsyncServicesResource,
@@ -20,34 +12,38 @@
2012
)
2113
from ..._compat import cached_property
2214
from ..._resource import SyncAPIResource, AsyncAPIResource
23-
from .address_maps import (
15+
from .prefixes.prefixes import (
16+
PrefixesResource,
17+
AsyncPrefixesResource,
18+
PrefixesResourceWithRawResponse,
19+
AsyncPrefixesResourceWithRawResponse,
20+
PrefixesResourceWithStreamingResponse,
21+
AsyncPrefixesResourceWithStreamingResponse,
22+
)
23+
from .address_maps.address_maps import (
2424
AddressMapsResource,
2525
AsyncAddressMapsResource,
2626
AddressMapsResourceWithRawResponse,
2727
AsyncAddressMapsResourceWithRawResponse,
2828
AddressMapsResourceWithStreamingResponse,
2929
AsyncAddressMapsResourceWithStreamingResponse,
3030
)
31-
from .loa_documents import (
31+
from .loa_documents.loa_documents import (
3232
LOADocumentsResource,
3333
AsyncLOADocumentsResource,
3434
LOADocumentsResourceWithRawResponse,
3535
AsyncLOADocumentsResourceWithRawResponse,
3636
LOADocumentsResourceWithStreamingResponse,
3737
AsyncLOADocumentsResourceWithStreamingResponse,
3838
)
39-
from .prefixes.prefixes import PrefixesResource, AsyncPrefixesResource
40-
from .regional_hostnames import (
39+
from .regional_hostnames.regional_hostnames import (
4140
RegionalHostnamesResource,
4241
AsyncRegionalHostnamesResource,
4342
RegionalHostnamesResourceWithRawResponse,
4443
AsyncRegionalHostnamesResourceWithRawResponse,
4544
RegionalHostnamesResourceWithStreamingResponse,
4645
AsyncRegionalHostnamesResourceWithStreamingResponse,
4746
)
48-
from .address_maps.address_maps import AddressMapsResource, AsyncAddressMapsResource
49-
from .loa_documents.loa_documents import LOADocumentsResource, AsyncLOADocumentsResource
50-
from .regional_hostnames.regional_hostnames import RegionalHostnamesResource, AsyncRegionalHostnamesResource
5147

5248
__all__ = ["AddressingResource", "AsyncAddressingResource"]
5349

src/cloudflare/resources/addressing/prefixes/prefixes.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@
66

77
import httpx
88

9-
from .bgp import (
9+
from .bgp.bgp import (
1010
BGPResource,
1111
AsyncBGPResource,
1212
BGPResourceWithRawResponse,
1313
AsyncBGPResourceWithRawResponse,
1414
BGPResourceWithStreamingResponse,
1515
AsyncBGPResourceWithStreamingResponse,
1616
)
17-
from .bgp.bgp import BGPResource, AsyncBGPResource
1817
from ...._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1918
from ...._utils import (
2019
maybe_transform,

src/cloudflare/resources/ai/ai.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@
77

88
import httpx
99

10-
from .models import (
11-
ModelsResource,
12-
AsyncModelsResource,
13-
ModelsResourceWithRawResponse,
14-
AsyncModelsResourceWithRawResponse,
15-
ModelsResourceWithStreamingResponse,
16-
AsyncModelsResourceWithStreamingResponse,
17-
)
1810
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
1911
from ..._utils import (
2012
required_args,
@@ -31,7 +23,14 @@
3123
async_to_streamed_response_wrapper,
3224
)
3325
from ..._wrappers import ResultWrapper
34-
from .models.models import ModelsResource, AsyncModelsResource
26+
from .models.models import (
27+
ModelsResource,
28+
AsyncModelsResource,
29+
ModelsResourceWithRawResponse,
30+
AsyncModelsResourceWithRawResponse,
31+
ModelsResourceWithStreamingResponse,
32+
AsyncModelsResourceWithStreamingResponse,
33+
)
3534
from ..._base_client import make_request_options
3635
from ...types.ai.ai_run_response import AIRunResponse
3736

src/cloudflare/resources/alerting/alerting.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@
2020
)
2121
from ..._compat import cached_property
2222
from ..._resource import SyncAPIResource, AsyncAPIResource
23-
from .destinations import (
24-
DestinationsResource,
25-
AsyncDestinationsResource,
26-
DestinationsResourceWithRawResponse,
27-
AsyncDestinationsResourceWithRawResponse,
28-
DestinationsResourceWithStreamingResponse,
29-
AsyncDestinationsResourceWithStreamingResponse,
30-
)
3123
from .available_alerts import (
3224
AvailableAlertsResource,
3325
AsyncAvailableAlertsResource,
@@ -36,7 +28,14 @@
3628
AvailableAlertsResourceWithStreamingResponse,
3729
AsyncAvailableAlertsResourceWithStreamingResponse,
3830
)
39-
from .destinations.destinations import DestinationsResource, AsyncDestinationsResource
31+
from .destinations.destinations import (
32+
DestinationsResource,
33+
AsyncDestinationsResource,
34+
DestinationsResourceWithRawResponse,
35+
AsyncDestinationsResourceWithRawResponse,
36+
DestinationsResourceWithStreamingResponse,
37+
AsyncDestinationsResourceWithStreamingResponse,
38+
)
4039

4140
__all__ = ["AlertingResource", "AsyncAlertingResource"]
4241

src/cloudflare/resources/api_gateway/api_gateway.py

+15-20
Original file line numberDiff line numberDiff line change
@@ -10,61 +10,56 @@
1010
SchemasResourceWithStreamingResponse,
1111
AsyncSchemasResourceWithStreamingResponse,
1212
)
13-
from .settings import (
13+
from ..._compat import cached_property
14+
from ..._resource import SyncAPIResource, AsyncAPIResource
15+
from .configurations import (
16+
ConfigurationsResource,
17+
AsyncConfigurationsResource,
18+
ConfigurationsResourceWithRawResponse,
19+
AsyncConfigurationsResourceWithRawResponse,
20+
ConfigurationsResourceWithStreamingResponse,
21+
AsyncConfigurationsResourceWithStreamingResponse,
22+
)
23+
from .settings.settings import (
1424
SettingsResource,
1525
AsyncSettingsResource,
1626
SettingsResourceWithRawResponse,
1727
AsyncSettingsResourceWithRawResponse,
1828
SettingsResourceWithStreamingResponse,
1929
AsyncSettingsResourceWithStreamingResponse,
2030
)
21-
from ..._compat import cached_property
22-
from .discovery import (
31+
from .discovery.discovery import (
2332
DiscoveryResource,
2433
AsyncDiscoveryResource,
2534
DiscoveryResourceWithRawResponse,
2635
AsyncDiscoveryResourceWithRawResponse,
2736
DiscoveryResourceWithStreamingResponse,
2837
AsyncDiscoveryResourceWithStreamingResponse,
2938
)
30-
from .operations import (
39+
from .operations.operations import (
3140
OperationsResource,
3241
AsyncOperationsResource,
3342
OperationsResourceWithRawResponse,
3443
AsyncOperationsResourceWithRawResponse,
3544
OperationsResourceWithStreamingResponse,
3645
AsyncOperationsResourceWithStreamingResponse,
3746
)
38-
from ..._resource import SyncAPIResource, AsyncAPIResource
39-
from .user_schemas import (
47+
from .user_schemas.user_schemas import (
4048
UserSchemasResource,
4149
AsyncUserSchemasResource,
4250
UserSchemasResourceWithRawResponse,
4351
AsyncUserSchemasResourceWithRawResponse,
4452
UserSchemasResourceWithStreamingResponse,
4553
AsyncUserSchemasResourceWithStreamingResponse,
4654
)
47-
from .configurations import (
48-
ConfigurationsResource,
49-
AsyncConfigurationsResource,
50-
ConfigurationsResourceWithRawResponse,
51-
AsyncConfigurationsResourceWithRawResponse,
52-
ConfigurationsResourceWithStreamingResponse,
53-
AsyncConfigurationsResourceWithStreamingResponse,
54-
)
55-
from .settings.settings import SettingsResource, AsyncSettingsResource
56-
from .discovery.discovery import DiscoveryResource, AsyncDiscoveryResource
57-
from .expression_template import (
55+
from .expression_template.expression_template import (
5856
ExpressionTemplateResource,
5957
AsyncExpressionTemplateResource,
6058
ExpressionTemplateResourceWithRawResponse,
6159
AsyncExpressionTemplateResourceWithRawResponse,
6260
ExpressionTemplateResourceWithStreamingResponse,
6361
AsyncExpressionTemplateResourceWithStreamingResponse,
6462
)
65-
from .operations.operations import OperationsResource, AsyncOperationsResource
66-
from .user_schemas.user_schemas import UserSchemasResource, AsyncUserSchemasResource
67-
from .expression_template.expression_template import ExpressionTemplateResource, AsyncExpressionTemplateResource
6863

6964
__all__ = ["APIGatewayResource", "AsyncAPIGatewayResource"]
7065

src/cloudflare/resources/botnet_feed/botnet_feed.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@
1010
ASNResourceWithStreamingResponse,
1111
AsyncASNResourceWithStreamingResponse,
1212
)
13-
from .configs import (
13+
from ..._compat import cached_property
14+
from ..._resource import SyncAPIResource, AsyncAPIResource
15+
from .configs.configs import (
1416
ConfigsResource,
1517
AsyncConfigsResource,
1618
ConfigsResourceWithRawResponse,
1719
AsyncConfigsResourceWithRawResponse,
1820
ConfigsResourceWithStreamingResponse,
1921
AsyncConfigsResourceWithStreamingResponse,
2022
)
21-
from ..._compat import cached_property
22-
from ..._resource import SyncAPIResource, AsyncAPIResource
23-
from .configs.configs import ConfigsResource, AsyncConfigsResource
2423

2524
__all__ = ["BotnetFeedResource", "AsyncBotnetFeedResource"]
2625

src/cloudflare/resources/cloudforce_one/cloudforce_one.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
from __future__ import annotations
44

5-
from .requests import (
5+
from ..._compat import cached_property
6+
from ..._resource import SyncAPIResource, AsyncAPIResource
7+
from .requests.requests import (
68
RequestsResource,
79
AsyncRequestsResource,
810
RequestsResourceWithRawResponse,
911
AsyncRequestsResourceWithRawResponse,
1012
RequestsResourceWithStreamingResponse,
1113
AsyncRequestsResourceWithStreamingResponse,
1214
)
13-
from ..._compat import cached_property
14-
from ..._resource import SyncAPIResource, AsyncAPIResource
15-
from .requests.requests import RequestsResource, AsyncRequestsResource
1615

1716
__all__ = ["CloudforceOneResource", "AsyncCloudforceOneResource"]
1817

src/cloudflare/resources/dns/analytics/analytics.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
from __future__ import annotations
44

5-
from .reports import (
5+
from ...._compat import cached_property
6+
from ...._resource import SyncAPIResource, AsyncAPIResource
7+
from .reports.reports import (
68
ReportsResource,
79
AsyncReportsResource,
810
ReportsResourceWithRawResponse,
911
AsyncReportsResourceWithRawResponse,
1012
ReportsResourceWithStreamingResponse,
1113
AsyncReportsResourceWithStreamingResponse,
1214
)
13-
from ...._compat import cached_property
14-
from ...._resource import SyncAPIResource, AsyncAPIResource
15-
from .reports.reports import ReportsResource, AsyncReportsResource
1615

1716
__all__ = ["AnalyticsResource", "AsyncAnalyticsResource"]
1817

src/cloudflare/resources/dns/dns.py

+5-8
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,32 @@
1818
RecordsResourceWithStreamingResponse,
1919
AsyncRecordsResourceWithStreamingResponse,
2020
)
21-
from .settings import (
21+
from ..._compat import cached_property
22+
from ..._resource import SyncAPIResource, AsyncAPIResource
23+
from .settings.settings import (
2224
SettingsResource,
2325
AsyncSettingsResource,
2426
SettingsResourceWithRawResponse,
2527
AsyncSettingsResourceWithRawResponse,
2628
SettingsResourceWithStreamingResponse,
2729
AsyncSettingsResourceWithStreamingResponse,
2830
)
29-
from ..._compat import cached_property
30-
from .analytics import (
31+
from .analytics.analytics import (
3132
AnalyticsResource,
3233
AsyncAnalyticsResource,
3334
AnalyticsResourceWithRawResponse,
3435
AsyncAnalyticsResourceWithRawResponse,
3536
AnalyticsResourceWithStreamingResponse,
3637
AsyncAnalyticsResourceWithStreamingResponse,
3738
)
38-
from ..._resource import SyncAPIResource, AsyncAPIResource
39-
from .zone_transfers import (
39+
from .zone_transfers.zone_transfers import (
4040
ZoneTransfersResource,
4141
AsyncZoneTransfersResource,
4242
ZoneTransfersResourceWithRawResponse,
4343
AsyncZoneTransfersResourceWithRawResponse,
4444
ZoneTransfersResourceWithStreamingResponse,
4545
AsyncZoneTransfersResourceWithStreamingResponse,
4646
)
47-
from .settings.settings import SettingsResource, AsyncSettingsResource
48-
from .analytics.analytics import AnalyticsResource, AsyncAnalyticsResource
49-
from .zone_transfers.zone_transfers import ZoneTransfersResource, AsyncZoneTransfersResource
5047

5148
__all__ = ["DNSResource", "AsyncDNSResource"]
5249

src/cloudflare/resources/dns/zone_transfers/zone_transfers.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,6 @@
3434
IncomingResourceWithStreamingResponse,
3535
AsyncIncomingResourceWithStreamingResponse,
3636
)
37-
from .outgoing import (
38-
OutgoingResource,
39-
AsyncOutgoingResource,
40-
OutgoingResourceWithRawResponse,
41-
AsyncOutgoingResourceWithRawResponse,
42-
OutgoingResourceWithStreamingResponse,
43-
AsyncOutgoingResourceWithStreamingResponse,
44-
)
4537
from ...._compat import cached_property
4638
from .force_axfr import (
4739
ForceAXFRResource,
@@ -52,7 +44,14 @@
5244
AsyncForceAXFRResourceWithStreamingResponse,
5345
)
5446
from ...._resource import SyncAPIResource, AsyncAPIResource
55-
from .outgoing.outgoing import OutgoingResource, AsyncOutgoingResource
47+
from .outgoing.outgoing import (
48+
OutgoingResource,
49+
AsyncOutgoingResource,
50+
OutgoingResourceWithRawResponse,
51+
AsyncOutgoingResourceWithRawResponse,
52+
OutgoingResourceWithStreamingResponse,
53+
AsyncOutgoingResourceWithStreamingResponse,
54+
)
5655

5756
__all__ = ["ZoneTransfersResource", "AsyncZoneTransfersResource"]
5857

0 commit comments

Comments
 (0)