-
Notifications
You must be signed in to change notification settings - Fork 162
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
Added static typing to data_readers/data_utils.py #658
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.
2 main comments
@@ -15,10 +17,10 @@ | |||
from .. import dp_logging | |||
from .filepath_or_buffer import FileOrBufferHandler, is_stream_buffer # NOQA | |||
|
|||
logger = dp_logging.get_child_logger(__name__) | |||
logger: Logger = dp_logging.get_child_logger(__name__) |
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.
if you import annotations
from __futures__
can you not import the Logger
here?
@@ -1,10 +1,12 @@ | |||
"""Contains functions for data readers.""" | |||
import json | |||
from logging import Logger |
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.
might be able to get rid of this with annotations
import from __futures__
@@ -299,13 +301,14 @@ def read_csv_df( | |||
|
|||
# if the buffer was wrapped, detach it before returning | |||
if is_buf_wrapped: | |||
assert isinstance(file_path, TextIOWrapper) |
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.
code change: is this required by mypy
?
c7107fc
to
2cbde0e
Compare
#610