Skip to content

Commit 39163fe

Browse files
author
zhansheng.lzs
committed
chore(release): prepare 2.0.3
1 parent 712eaa4 commit 39163fe

59 files changed

Lines changed: 300 additions & 179 deletions

Some content is hidden

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

‎.pre-commit-config.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ repos:
9797
--disable=R0913,
9898
--disable=E0401,
9999
--disable=E1101,
100+
--disable=E0611, # Runtime meta-path aliases are invisible to astroid
100101
--disable=C0415,
101102
--disable=W0603,
102103
--disable=R1705,
@@ -142,6 +143,7 @@ repos:
142143
--disable=R0913,
143144
--disable=E0401,
144145
--disable=E1101,
146+
--disable=E0611, # Runtime meta-path aliases are invisible to astroid
145147
--disable=C0415,
146148
--disable=W0603,
147149
--disable=R1705,

‎dashscope/__init__.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,7 @@ def __getattr__(name):
200200

201201
def __dir__():
202202
return sorted(
203-
set(globals())
204-
| set(_DEPRECATED_LAZY_IMPORTS)
205-
| _LEGACY_LAZY_MODULES,
203+
set(globals()) | set(_DEPRECATED_LAZY_IMPORTS) | _LEGACY_LAZY_MODULES,
206204
)
207205

208206

‎dashscope/__init__.pyi‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,29 @@ def close_shared_aio_session() -> None: ...
4343
def close_shared_sync_session() -> None: ...
4444
def set_region(region: str, workspace_id: Optional[str] = ...) -> None: ...
4545

46+
# Lazily resolved compatibility modules.
47+
aigc: Any
48+
agentstudio: Any
49+
api_entities: Any
50+
app: Any
51+
applications: Any
52+
assistants: Any
53+
audio: Any
54+
cli: Any
55+
common: Any
56+
embeddings: Any
57+
files: Any
58+
finetune: Any
59+
io: Any
60+
model: Any
61+
models: Any
62+
multimodal: Any
63+
nlp: Any
64+
protocol: Any
65+
rerank: Any
66+
threads: Any
67+
utils: Any
68+
4669
# ---------------------------------------------------------------------------
4770
# Response types
4871
# ---------------------------------------------------------------------------

‎dashscope/applications/agentstudio/client.py‎

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
validate_region,
1414
validate_workspace_id,
1515
)
16-
from dashscope.applications.agentstudio.resources.agents import Agents, AsyncAgents
16+
from dashscope.applications.agentstudio.resources.agents import (
17+
Agents,
18+
AsyncAgents,
19+
)
1720
from dashscope.applications.agentstudio.resources.deployments import (
1821
AsyncDeploymentRuns,
1922
AsyncDeployments,
@@ -24,15 +27,30 @@
2427
Environments,
2528
AsyncEnvironments,
2629
)
27-
from dashscope.applications.agentstudio.resources.files import Files, AsyncFiles
30+
from dashscope.applications.agentstudio.resources.files import (
31+
Files,
32+
AsyncFiles,
33+
)
2834
from dashscope.applications.agentstudio.resources.memory_stores import (
2935
MemoryStores,
3036
AsyncMemoryStores,
3137
)
32-
from dashscope.applications.agentstudio.resources.security import Security, AsyncSecurity
33-
from dashscope.applications.agentstudio.resources.sessions import Sessions, AsyncSessions
34-
from dashscope.applications.agentstudio.resources.skills import Skills, AsyncSkills
35-
from dashscope.applications.agentstudio.resources.vaults import Vaults, AsyncVaults
38+
from dashscope.applications.agentstudio.resources.security import (
39+
Security,
40+
AsyncSecurity,
41+
)
42+
from dashscope.applications.agentstudio.resources.sessions import (
43+
Sessions,
44+
AsyncSessions,
45+
)
46+
from dashscope.applications.agentstudio.resources.skills import (
47+
Skills,
48+
AsyncSkills,
49+
)
50+
from dashscope.applications.agentstudio.resources.vaults import (
51+
Vaults,
52+
AsyncVaults,
53+
)
3654
from dashscope.applications.agentstudio.resources.webhook_endpoints import (
3755
AsyncWebhookEndpoints,
3856
WebhookEndpoints,
@@ -43,7 +61,10 @@
4361
AGENTSTUDIO_DEFAULT_TIMEOUT,
4462
AGENTSTUDIO_MAX_RETRIES,
4563
)
46-
from dashscope.applications.agentstudio.transport import SyncTransport, AsyncTransport
64+
from dashscope.applications.agentstudio.transport import (
65+
SyncTransport,
66+
AsyncTransport,
67+
)
4768
from dashscope._config import _api_key_from_file, settings
4869

4970

‎dashscope/applications/agentstudio/exceptions.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737

3838
from dashscope import _error_registry as _registry
3939
from dashscope import errors as _v2_errors
40+
41+
# pylint: disable-next=unused-import
4042
from dashscope.errors import ( # noqa: F401
4143
APIConnectionError,
4244
APIStatusError,

‎dashscope/applications/agentstudio/resources/__init__.py‎

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@
1515
client.sessions.events.send(session.id, [user_message("hello")])
1616
"""
1717

18-
from dashscope.applications.agentstudio.resources.agents import Agents, AsyncAgents
18+
from dashscope.applications.agentstudio.resources.agents import (
19+
Agents,
20+
AsyncAgents,
21+
)
1922
from dashscope.applications.agentstudio.resources.deployments import (
2023
AsyncDeploymentRuns,
2124
AsyncDeployments,
@@ -26,7 +29,10 @@
2629
Environments,
2730
AsyncEnvironments,
2831
)
29-
from dashscope.applications.agentstudio.resources.files import Files, AsyncFiles
32+
from dashscope.applications.agentstudio.resources.files import (
33+
Files,
34+
AsyncFiles,
35+
)
3036
from dashscope.applications.agentstudio.resources.memory_stores import (
3137
AsyncMemories,
3238
AsyncMemoryStores,
@@ -41,7 +47,10 @@
4147
_AioTypedEventStream,
4248
_TypedEventStream,
4349
)
44-
from dashscope.applications.agentstudio.resources.sessions import Sessions, AsyncSessions
50+
from dashscope.applications.agentstudio.resources.sessions import (
51+
Sessions,
52+
AsyncSessions,
53+
)
4554
from dashscope.applications.agentstudio.resources.skills import (
4655
AsyncSkillVersions,
4756
AsyncSkills,

‎dashscope/applications/agentstudio/resources/agents.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515
_coerce_agent,
1616
_coerce_agent_version,
1717
)
18-
from dashscope.applications.agentstudio.types import Agent, AgentVersion, ModelConfig
18+
from dashscope.applications.agentstudio.types import (
19+
Agent,
20+
AgentVersion,
21+
ModelConfig,
22+
)
1923
from dashscope.applications.agentstudio.types.params import (
2024
AgentCreateParams,
2125
AgentListParams,

‎dashscope/applications/agentstudio/resources/environments.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
from dashscope.applications.agentstudio.resources._helpers import (
1515
_coerce_env,
1616
)
17-
from dashscope.applications.agentstudio.types import DeleteResponse, Environment
17+
from dashscope.applications.agentstudio.types import (
18+
DeleteResponse,
19+
Environment,
20+
)
1821
from dashscope.applications.agentstudio.types.params import (
1922
EnvironmentCreateParams,
2023
EnvironmentListParams,

‎dashscope/applications/agentstudio/resources/security.py‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,13 @@
1212

1313
from typing import Any, Mapping, Optional, Sequence
1414

15-
from dashscope.applications.agentstudio.types import SecurityAlertList, SecurityOverview
16-
from dashscope.applications.agentstudio.types.params import SecurityListAgentLogsParams
15+
from dashscope.applications.agentstudio.types import (
16+
SecurityAlertList,
17+
SecurityOverview,
18+
)
19+
from dashscope.applications.agentstudio.types.params import (
20+
SecurityListAgentLogsParams,
21+
)
1722

1823
_PATH_SECURITY_OVERVIEW = "/security/overview"
1924
_PATH_SECURITY_AGENT_LOGS = "/security/agent_logs"

‎dashscope/applications/agentstudio/resources/session_events.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
_events_path,
2525
_stream_path,
2626
)
27-
from dashscope.applications.agentstudio.streaming import AsyncEventStream, EventStream
27+
from dashscope.applications.agentstudio.streaming import (
28+
AsyncEventStream,
29+
EventStream,
30+
)
2831
from dashscope.applications.agentstudio.types import ServerEvent
2932
from dashscope.applications.agentstudio.types.params import (
3033
SessionEventListParams,

0 commit comments

Comments
 (0)