Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ dev =
flake8>=6.0.0
flake8-bugbear>=23.2.13
isort>=5.10.1
pyright==1.1.365 # must be larger than 1.1.366; https://github.com/microsoft/pyright/issues/8087
pyright>=1.1.367
pre-commit>=2.15.0
wheel
matplotlib
Expand Down
20 changes: 7 additions & 13 deletions shiny/render/transformer/_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,6 @@ def __init__(self, *args: P.args, **kwargs: P.kwargs) -> None:
self.kwargs = kwargs


def empty_params() -> TransformerParams[P]:
"""
Return `TransformerParams` definition with no parameters.
"""

def inner(*args: P.args, **kwargs: P.kwargs) -> TransformerParams[P]:
return TransformerParams[P](*args, **kwargs)

return inner()


# ======================================================================================
# Renderer / RendererSync / RendererAsync base class
# ======================================================================================
Expand Down Expand Up @@ -544,7 +533,9 @@ def __call__(
params: TransformerParams[P] | None = None,
) -> OutputRenderer[OT] | OutputRendererDecorator[IT, OT]:
if params is None:
params = self.params()
params = (
self.params()
) # pyright: ignore[reportCallIssue] ; Missing param spec args; False positive error as we know there should be no args.
if not isinstance(params, TransformerParams):
raise TypeError(
"Expected `params` to be of type `TransformerParams` but received "
Expand All @@ -560,7 +551,10 @@ def __init__(
self._fn = fn
self.ValueFn = ValueFn[IT]
self.OutputRenderer = OutputRenderer[OT]
self.OutputRendererDecorator = OutputRendererDecorator[IT, OT]

self.OutputRendererDecorator = OutputRendererDecorator[
IT, OT
] # pyright: ignore[reportAttributeAccessIssue] ; False positive error as the types should match the class definition. Not worrying about it as this code is deprecated.


@overload
Expand Down