Skip to content

Commit 05cd5e9

Browse files
authored
fix: replace stale entry in a2a.types.__all__ with actual import name (#902)
- Fix stale `__all__` entry in `src/a2a/types/__init__.py`: `AuthenticatedExtendedCardNotConfiguredError` does not exist in the module namespace - the actual import is `ExtendedAgentCardNotConfiguredError`. This caused `AttributeError` at runtime on `from a2a.types import *` or any direct reference to the listed name. - Enable ruff's [F822](https://docs.astral.sh/ruff/rules/undefined-export/) rule for `__init__.py` files by adding `preview = true` and `explicit-preview-rules = true` under `[tool.ruff.lint]`. This prevents stale `__all__` entries from going undetected in the future, without introducing any new preview-only rules.
1 parent 4586c3e commit 05cd5e9

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ indent-width = 4 # Google Style Guide §3.4: 4 spaces
199199
target-version = "py310" # Minimum Python version
200200

201201
[tool.ruff.lint]
202+
preview = true
203+
explicit-preview-rules = true
202204
ignore = [
203205
"COM812", # Trailing comma missing.
204206
"FBT001", # Boolean positional arg in function definition

src/a2a/types/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@
9393
'AgentProvider',
9494
'AgentSkill',
9595
'Artifact',
96-
'AuthenticatedExtendedCardNotConfiguredError',
9796
'AuthenticationInfo',
9897
'AuthorizationCodeOAuthFlow',
9998
'CancelTaskRequest',
10099
'ClientCredentialsOAuthFlow',
101100
'ContentTypeNotSupportedError',
102101
'DeleteTaskPushNotificationConfigRequest',
103102
'DeviceCodeOAuthFlow',
103+
'ExtendedAgentCardNotConfiguredError',
104104
'ExtensionSupportRequiredError',
105105
'GetExtendedAgentCardRequest',
106106
'GetTaskPushNotificationConfigRequest',

0 commit comments

Comments
 (0)