Skip to content

Comments

Fix type hints for EchoReader callbacks#22

Merged
JohnCHarrington merged 2 commits intorefactor-python-codefrom
copilot/sub-pr-17-again
Feb 19, 2026
Merged

Fix type hints for EchoReader callbacks#22
JohnCHarrington merged 2 commits intorefactor-python-codefrom
copilot/sub-pr-17-again

Conversation

Copy link

Copilot AI commented Feb 19, 2026

depth_callback was annotated as Callable[[dict], Coroutine] but invoked with a float, causing mypy errors and misleading callers. Coroutine return types were also left bare (no type parameters).

Changes

  • depth_callback: Callable[[dict], Coroutine]Callable[[float], Coroutine[Any, Any, None]]
  • data_callback: Callable[[dict], Coroutine]Callable[[dict], Coroutine[Any, Any, None]]
  • Added from typing import Any
class EchoReader:
    def __init__(
        self,
        data_callback: Callable[[dict], Coroutine[Any, Any, None]],
        depth_callback: Callable[[float], Coroutine[Any, Any, None]],
        ...
    ):

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: JohnCHarrington <1857365+JohnCHarrington@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on python code refactor and workflows enhancements Fix type hints for EchoReader callbacks Feb 19, 2026
@JohnCHarrington JohnCHarrington marked this pull request as ready for review February 19, 2026 11:29
@JohnCHarrington JohnCHarrington merged commit 2da17c3 into refactor-python-code Feb 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants