From 623a5fe36565314452f9f8e1f09393f72140da8f Mon Sep 17 00:00:00 2001 From: Juro Oravec Date: Tue, 16 Apr 2024 21:01:09 +0200 Subject: [PATCH] refactor: fix types for render and render_to_response --- src/django_components/component.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/django_components/component.py b/src/django_components/component.py index c419fb3f..5be4903d 100644 --- a/src/django_components/component.py +++ b/src/django_components/component.py @@ -261,7 +261,7 @@ class Component(View, metaclass=SimplifiedInterfaceMediaDefiningClass): def render( self, - context_data: Dict[str, Any], + context_data: Union[Dict[str, Any], Context], slots_data: Optional[Dict[SlotName, str]] = None, escape_slots_content: bool = True, ) -> str: @@ -288,7 +288,7 @@ class Component(View, metaclass=SimplifiedInterfaceMediaDefiningClass): def render_to_response( self, - context_data: Dict[str, Any], + context_data: Union[Dict[str, Any], Context], slots_data: Optional[Dict[SlotName, str]] = None, escape_slots_content: bool = True, *args: Any,