Add typing for BaseRegistryHook and BaseRegistryMultiItemHook.

Review Request #13981 — Created June 17, 2024 and submitted — Latest diff uploaded

Information

Djblets
release-5.x

Reviewers

Registries gained support for typing a while back, helping to ensure
that any items provided or fetched were of compatible types.

This change extends that to BaseRegistryHook and
BaseRegistryMultiItemHook. This makes it easier to instantiate these
hooks with items and to assign a registry when defining a subclass.

Unit tests pass.

Tested this with an in-progress hook definition.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Add typing for BaseRegistryHook and BaseRegistryMultiItemHook.
Registries gained support for typing a while back, helping to ensure that any items provided or fetched were of compatible types. This change extends that to `BaseRegistryHook` and `BaseRegistryMultiItemHook`. This makes it easier to instantiate these hooks with items and to assign a registry when defining a subclass.
3f24780def7b65ff49adca9e077176a48fe54c2d Christian Hammond
djblets/extensions/hooks.py
Loading...