-
Notifications
You must be signed in to change notification settings - Fork 25
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
typing updates for Task #194
Conversation
Also removed Python 2 style code to derive from object. I did not cover update_rqmt yet because this would require Protocol (not just Callable), and I'm not sure if we want that (requires Python 3.8).
Requires Python 3.7. At least the CI here is run with Python 3.6, thus does not support it...
start: str, | ||
resume: Optional[str] = None, | ||
rqmt: Optional[Dict[str, Any]] = None, | ||
args: Optional[Sequence[Union[List[Any], Any]]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args: Optional[Sequence[Union[List[Any], Any]]] = None, | |
args: Optional[Sequence[Any]] = None, |
can already be Any
and List[Any]
is contained in Any
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea I know, but sometimes I prefer this to give some more specific type hints to what types would be specifically expected here, or specially handled, even though other types (any other types) would also be ok.
Also, I basically just translated the typing from the earlier docstring. I also wondered a bit about why this is here at all, and I thought there is indeed maybe a special meaning when there is a list?
Why would |
We call |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Also removed Python 2 style code to derive from object.
I did not cover
update_rqmt
yet because this would requireProtocol
(not justCallable
), and I'm not sure if we want that (requires Python 3.8).