Skip to content

Improve Signal Typing #5752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

ddkasa
Copy link
Contributor

@ddkasa ddkasa commented Apr 17, 2025

Please review the following checklist.

  • Docstrings on all new or modified functions / classes
  • Updated documentation
  • Updated CHANGELOG.md (where appropriate)

Updates the Signal class to use the generic type for callbacks. This allows type checker to know what the full type of the callable should be when subscribing.

ddkasa added 2 commits April 17, 2025 18:42
When publishing the signal requires a `_pruning` attribute in order to
check if the node is not currently getting removed. The attribute is
implemented in `DOMNode` and not `MessagePump`.
Applies generics to the `SignalCallbackType`. Primarily to indicate what
type is required, when subscribing.
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.

1 participant