-
-
Notifications
You must be signed in to change notification settings - Fork 382
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
Fix warnings #140
Fix warnings #140
Conversation
smart_open/tests/test_smart_open.py
Outdated
|
||
def test_write_read_bz2(self): | ||
"""Can write and read bz2?""" | ||
test_file = tempfile.NamedTemporaryFile('wb', suffix='.bz2', delete=False).name | ||
self.write_read_assertion(test_file) | ||
with tempfile.NamedTemporaryFile('wb', suffix='.bz2', delete=False) as file: |
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.
small nitpick - can you rename file
(because this is type in python), for example, use infile
(here and anywhere)
smart_open/smart_open_lib.py
Outdated
@@ -530,11 +543,11 @@ def compression_wrapper(file_obj, filename, mode): | |||
from bz2file import BZ2File | |||
else: | |||
from bz2 import BZ2File | |||
return make_closing(BZ2File)(file_obj, mode) | |||
return make_closing(BZ2File, file_obj)(file_obj, mode) |
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 slightly strange file_obj)(file_obj
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.
Tried redo as just classes
No description provided.