@@ -120,17 +120,6 @@ def __init__(self, *args: P.args, **kwargs: P.kwargs) -> None:
120
120
self .kwargs = kwargs
121
121
122
122
123
- def empty_params () -> TransformerParams [P ]:
124
- """
125
- Return `TransformerParams` definition with no parameters.
126
- """
127
-
128
- def inner (* args : P .args , ** kwargs : P .kwargs ) -> TransformerParams [P ]:
129
- return TransformerParams [P ](* args , ** kwargs )
130
-
131
- return inner ()
132
-
133
-
134
123
# ======================================================================================
135
124
# Renderer / RendererSync / RendererAsync base class
136
125
# ======================================================================================
@@ -544,7 +533,9 @@ def __call__(
544
533
params : TransformerParams [P ] | None = None ,
545
534
) -> OutputRenderer [OT ] | OutputRendererDecorator [IT , OT ]:
546
535
if params is None :
547
- params = self .params ()
536
+ params = (
537
+ self .params ()
538
+ ) # pyright: ignore[reportCallIssue] ; Missing param spec args; False positive error as we know there should be no args.
548
539
if not isinstance (params , TransformerParams ):
549
540
raise TypeError (
550
541
"Expected `params` to be of type `TransformerParams` but received "
@@ -560,7 +551,10 @@ def __init__(
560
551
self ._fn = fn
561
552
self .ValueFn = ValueFn [IT ]
562
553
self .OutputRenderer = OutputRenderer [OT ]
563
- self .OutputRendererDecorator = OutputRendererDecorator [IT , OT ]
554
+
555
+ self .OutputRendererDecorator = OutputRendererDecorator [
556
+ IT , OT
557
+ ] # pyright: ignore[reportAttributeAccessIssue] ; False positive error as the types should match the class definition. Not worrying about it as this code is deprecated.
564
558
565
559
566
560
@overload
0 commit comments