Skip to content

Commit 6ba7c9a

Browse files
authored
Fix devtools (#198)
We removed name, but this plugin still used it. (Don't think it actually uses it tho). Verified it works
1 parent 22b9453 commit 6ba7c9a

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212
permissions: read-all
1313

1414
env:
15-
EXCLUDE_PACKAGE_FOLDERS: "a2aprotocol"
15+
EXCLUDE_PACKAGE_FOLDERS: ""
1616

1717
jobs:
1818
build:

packages/apps/src/microsoft/teams/apps/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,14 +93,14 @@ def __init__(self, **options: Unpack[AppOptions]):
9393
self.container = Container()
9494
self.container.set_provider("id", providers.Object(self.id))
9595
self.container.set_provider("credentials", providers.Object(self.credentials))
96-
self.container.set_provider("bot_token", providers.Factory(lambda: self._get_or_get_bot_token))
96+
self.container.set_provider("bot_token", providers.Factory(lambda: self._get_bot_token))
9797
self.container.set_provider("logger", providers.Object(self.log))
9898
self.container.set_provider("storage", providers.Object(self.storage))
9999
self.container.set_provider(self.http_client.__class__.__name__, providers.Factory(lambda: self.http_client))
100100

101101
self.api = ApiClient(
102102
"https://smba.trafficmanager.net/teams",
103-
self.http_client.clone(ClientOptions(token=self._get_or_get_bot_token)),
103+
self.http_client.clone(ClientOptions(token=self._get_bot_token)),
104104
)
105105

106106
plugins: List[PluginBase] = list(self.options.plugins)
@@ -464,5 +464,5 @@ async def call_next(r: Request) -> Any:
464464
# Named decoration: @app.func("name")
465465
return decorator
466466

467-
async def _get_or_get_bot_token(self):
467+
async def _get_bot_token(self):
468468
return await self._token_manager.get_bot_token()

packages/devtools/src/microsoft/teams/devtools/devtools_plugin.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
class DevToolsPlugin(Sender):
5050
logger: Annotated[Logger, LoggerDependencyOptions()]
5151
id: Annotated[Optional[TokenProtocol], DependencyMetadata(optional=True)]
52-
name: Annotated[Optional[TokenProtocol], DependencyMetadata(optional=True)]
5352
http: Annotated[HttpPlugin, DependencyMetadata()]
5453

5554
on_error_event: Annotated[Callable[[ErrorEvent], None], EventMetadata(name="error")]
@@ -180,7 +179,6 @@ async def on_socket_connection(self, websocket: WebSocket):
180179
"type": "metadata",
181180
"body": {
182181
"id": self.id.__str__(),
183-
"name": self.name.__str__(),
184182
"pages": self.pages,
185183
},
186184
"sent_at": datetime.now().isoformat(),

0 commit comments

Comments
 (0)