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 some typings informations and typecheck #589
Conversation
Hello @Carreau! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2020-09-18 16:50:15 UTC |
Added Typing to storage.py. Note in particular that some function can get bytes/str/anything that |
4ba77d3
to
43ba3e0
Compare
Mostly make it a bit clearer what is allowed/expected where. In particular many of the decode functions allow already decoded objects. Add Typing to store. Note in particular that some function can get bytes/str/anything that can be stringified though others only can get str/None as they don't call normalize on path.
rebased to fix conflicts in |
All tests are passing and the push was only to fix a trivial conflict in pytest.ini merging. Thanks. |
@@ -74,27 +76,27 @@ def encode_array_metadata(meta): | |||
return json_dumps(meta) | |||
|
|||
|
|||
def encode_dtype(d): | |||
def encode_dtype(d: np.dtype) -> 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.
see #700
Mostly make it a bit clearer what is allowed/expected where.
In particular many of the decode fucntions allow already decoded
objects.
TODO: