-
Notifications
You must be signed in to change notification settings - Fork 268
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 in Deterministic Cache #828
Conversation
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.
Looks good to me.
@drvinceknight @marcharper Is there a type for the variable It is mentioned as Tuple, but I am not sure about the definition. |
Take a look at the |
@@ -78,7 +79,7 @@ def __setitem__(self, key, value): | |||
super().__setitem__(self._key_transform(key), value) | |||
|
|||
@staticmethod | |||
def _is_valid_key(key): | |||
def _is_valid_key(key) -> boolean: |
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.
bool
instead of boolean
@@ -145,7 +146,7 @@ def save(self, file_name: str): | |||
pickle.dump(self.data, io) | |||
return True | |||
|
|||
def load(self, file_name: str): | |||
def load(self, file_name: str) -> boolean: |
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.
same comment
@@ -145,7 +146,7 @@ def save(self, file_name): | |||
pickle.dump(self.data, io) | |||
return True | |||
|
|||
def load(self, file_name): | |||
def load(self, file_name: str) -> boolean: |
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.
This needs to bool
rather than boolean
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.
Done
Fixes a Part of #808