Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some issues with the types #41

Merged
merged 3 commits into from
May 13, 2024
Merged

fix some issues with the types #41

merged 3 commits into from
May 13, 2024

Conversation

DetachHead
Copy link
Contributor

  • fix type error when the return_completed_process argument isn't specified, which was causing it to resolve to the wrong overload:
    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:
    def run_node(*args: str)
        node(args) # error: Argument of type "tuple[str, ...]" cannot be assigned to parameter "args" of type "list[str] | None"

@pep8speaks
Copy link

pep8speaks commented May 13, 2024

Hello @DetachHead! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 83:80: E501 line too long (86 > 79 characters)
Line 132:80: E501 line too long (86 > 79 characters)
Line 186:80: E501 line too long (86 > 79 characters)

Comment last updated at 2024-05-13 09:11:56 UTC

Copy link
Owner

@njzjz njzjz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@njzjz njzjz merged commit 14a8183 into njzjz:master May 13, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants