-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix some issues with the types (#41)
- fix type error when the `return_completed_process` argument isn't specified, which was causing it to resolve to the wrong overload: ```py exit_code: int = node(["foo"]) # error: Expression of type "int | CompletedProcess[str | bytes]" is incompatible with declared type "int" ``` - change the type of `args` to `Iterable[str]` instead of `list[str]`, which is more flexible. for example, when wrapping it with a function that passes it a tuple: ```py def run_node(*args: str) node(args) # error: Argument of type "tuple[str, ...]" cannot be assigned to parameter "args" of type "list[str] | None" ``` --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
d1b0d74
commit 14a8183
Showing
1 changed file
with
48 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters