File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import functools
44import typing as t
55
6- from markupsafe import Markup as _Markup
6+ import markupsafe
77
88if t .TYPE_CHECKING :
99 from collections .abc import Callable , Iterator , Mapping
@@ -73,12 +73,12 @@ def __getitem__(self, children: C | None) -> R:
7373 #
7474 return self .wrapped (children ) # type: ignore[call-arg]
7575
76- def __str__ (self ) -> _Markup :
76+ def __str__ (self ) -> markupsafe . Markup :
7777 # This is the unbound component being rendered to a string:
7878 #
7979 # str(my_component)
8080 #
81- return _Markup (self .wrapped (None )) # type: ignore[call-arg]
81+ return markupsafe . Markup (self .wrapped (None )) # type: ignore[call-arg]
8282
8383 __html__ = __str__
8484
@@ -120,12 +120,12 @@ def __getitem__(self, children: C | None) -> R:
120120 #
121121 return self ._func (children , * self ._args , ** self ._kwargs )
122122
123- def __str__ (self ) -> _Markup :
123+ def __str__ (self ) -> markupsafe . Markup :
124124 # This is a bound component being rendered to a string:
125125 #
126126 # str(my_component(title="My title"))
127127 #
128- return _Markup (self ._func (None , * self ._args , ** self ._kwargs ))
128+ return markupsafe . Markup (self ._func (None , * self ._args , ** self ._kwargs ))
129129
130130 __html__ = __str__
131131
You can’t perform that action at this time.
0 commit comments