Skip to content

Conversation

@jdost
Copy link
Contributor

@jdost jdost commented Mar 21, 2019

This was added to the 7.0 release of click (PR for reference). This may not make sense, as the __init__ stub for click appears to be setting the version to 6.6.

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Thanks, one remark.



class Exit(RuntimeError):
...
Copy link
Collaborator

Choose a reason for hiding this comment

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

According to the PR __init__() takes a code argument.

@jdost
Copy link
Contributor Author

jdost commented Mar 21, 2019

Ah yeah, that was a miss on my part. I have added the __init__ signature.



class Exit(RuntimeError):
def __init__(self, code: Optional[int] = ...) -> None:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks, one more thing: code should not be optional. Confusingly, Optional does not mean that an argument is optional (assigning a default values does that), it means that a value can also be None, which is not the case here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this in 12e8628

@srittau srittau merged commit 168a968 into python:master Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants