Skip to content

Commit

Permalink
chore: fix add_output signature
Browse files Browse the repository at this point in the history
Use * to enforce that alloc should always be specified as a kwarg
  • Loading branch information
nfrasser committed Sep 6, 2024
1 parent 9e1c655 commit 2eddd5b
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions cryosparc/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -1255,20 +1255,23 @@ def add_input(
def add_output(
self,
type: Datatype,
name: Optional[str],
slots: List[SlotSpec],
passthrough: Optional[str],
title: Optional[str],
name: Optional[str] = ...,
slots: List[SlotSpec] = ...,
passthrough: Optional[str] = ...,
title: Optional[str] = ...,
*,
alloc: Literal[None] = None,
) -> str: ...
@overload
def add_output(
self,
type: Datatype,
name: Optional[str],
slots: List[SlotSpec],
passthrough: Optional[str],
title: Optional[str],
alloc: Union[int, Dataset],
name: Optional[str] = ...,
slots: List[SlotSpec] = ...,
passthrough: Optional[str] = ...,
title: Optional[str] = ...,
*,
alloc: Union[int, Dataset] = ...,
) -> Dataset: ...
def add_output(
self,
Expand All @@ -1277,6 +1280,7 @@ def add_output(
slots: List[SlotSpec] = [],
passthrough: Optional[str] = None,
title: Optional[str] = None,
*,
alloc: Union[int, Dataset, None] = None,
) -> Union[str, Dataset]:
"""
Expand Down

0 comments on commit 2eddd5b

Please sign in to comment.