Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
maartenbreddels committed Jun 22, 2023
1 parent 431d4ea commit 33ad817
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions solara/components/input_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
def InputFile(
label: str = "",
on_total_progress: Optional[Callable[[float], None]] = None,
on_file: Union[None, Callable[[Optional[FileInfo]], None], Callable[[List[FileInfo]], None]] = None,
on_file: Union[None, Callable[[Union[None, FileInfo, List[FileInfo]]], None], None] = None,
accept: str = "",
multiple: bool = False,
lazy: bool = True,
Expand Down Expand Up @@ -79,7 +79,8 @@ def handle_file() -> None:
return
if not wired_files:
if multiple:
on_file([])
empty: List[FileInfo] = []
on_file(empty)
else:
on_file(None)
return
Expand Down

0 comments on commit 33ad817

Please sign in to comment.