feat: alias component_registry imports for mypy (#499)

This commit is contained in:
Michał Kuczaj 2024-05-19 09:56:48 +02:00 committed by GitHub
parent 453b2a7e66
commit 1817edd391
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,8 +19,11 @@ from django.views import View
# Defining them here made little sense, since 1) component_tags.py and component.py # Defining them here made little sense, since 1) component_tags.py and component.py
# rely on them equally, and 2) it made it difficult to avoid circularity in the # rely on them equally, and 2) it made it difficult to avoid circularity in the
# way the two modules depend on one another. # way the two modules depend on one another.
from django_components.component_registry import AlreadyRegistered as AlreadyRegistered # NOQA
from django_components.component_registry import ComponentRegistry as ComponentRegistry # NOQA
from django_components.component_registry import NotRegistered as NotRegistered # NOQA
from django_components.component_registry import register as register # NOQA
from django_components.component_registry import registry # NOQA from django_components.component_registry import registry # NOQA
from django_components.component_registry import AlreadyRegistered, ComponentRegistry, NotRegistered, register # NOQA
from django_components.context import ( from django_components.context import (
_FILLED_SLOTS_CONTENT_CONTEXT_KEY, _FILLED_SLOTS_CONTENT_CONTEXT_KEY,
_PARENT_COMP_CONTEXT_KEY, _PARENT_COMP_CONTEXT_KEY,