-
Notifications
You must be signed in to change notification settings - Fork 269
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
Add type hints for action script #815
Conversation
@@ -1,10 +1,14 @@ | |||
from typing import NewType | |||
|
|||
C = NewType('Action', str) |
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.
I think you probably want Action = NewType('Action', str)
and to declare C and D as actions. Unfortunately it's not easy to do so without the Py3.6 additions to type hints. But I think this would still work for flip_action
.
@souravsingh This is a tough one actually -- I'm not sure of the best way to annotate this file since we'd like to use the Py3.6 method that I linked in the issue, and By the way, you can run the tests with |
@marcharper I have made some fixes. Is the Patch ready for merging? |
from typing import NewType | ||
|
||
Action = NewType('Action', str) | ||
Action = NewType('Action', str) |
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.
Let's remove the duplicate line.
I think so once the duplicate is removed, let's wait for another review and squash the commits on merge. |
No description provided.