Skip to content
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

feat: make SignalGroupDescriptor generic #297

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
remove future
  • Loading branch information
getzze committed Mar 11, 2024
commit c49d2464f9eda1944d078f98f09a882cf16cf9e1
2 changes: 1 addition & 1 deletion src/psygnal/_group_descriptor.py
Original file line number Diff line number Diff line change
@@ -412,9 +412,9 @@
signal_group_class: type[GroupType] | None = None,
collect_fields: bool = True,
):
grp_cls = signal_group_class or cast(type[GroupType], SignalGroup)
grp_cls = signal_group_class or cast(Type[GroupType], SignalGroup)
if not (isinstance(grp_cls, type) and issubclass(grp_cls, SignalGroup)):
raise TypeError(

Check warning on line 417 in src/psygnal/_group_descriptor.py

Codecov / codecov/patch

src/psygnal/_group_descriptor.py#L417

Added line #L417 was not covered by tests
f"'signal_group_class' must be a subclass of SignalGroup, "
f"not {grp_cls}"
)
Loading