Skip to content

Commit 534ae40

Browse files
fix(python): use typed annotations in _handle_permission_request
Use PermissionRequest and PermissionRequestResult types instead of plain dict to fix ty type checker errors from stricter enforcement. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 03acc9b commit 534ae40

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/copilot/session.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from .generated.session_events import SessionEvent, SessionEventType, session_event_from_dict
1515
from .types import (
1616
MessageOptions,
17+
PermissionRequest,
18+
PermissionRequestResult,
1719
SessionHooks,
1820
Tool,
1921
ToolHandler,
@@ -308,7 +310,7 @@ def _register_permission_handler(self, handler: Optional[_PermissionHandlerFn])
308310
with self._permission_handler_lock:
309311
self._permission_handler = handler
310312

311-
async def _handle_permission_request(self, request: dict) -> dict:
313+
async def _handle_permission_request(self, request: PermissionRequest) -> PermissionRequestResult:
312314
"""
313315
Handle a permission request from the Copilot CLI.
314316

0 commit comments

Comments
 (0)