Skip to content

Commit

Permalink
Prefer name attribute in smart_open_lib
Browse files Browse the repository at this point in the history
  • Loading branch information
ddelange authored Oct 17, 2024
1 parent 2df38d9 commit 643b782
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion smart_open/smart_open_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def open(
binary,
binary_mode,
compression,
filename=uri,
filename=getattr(binary, "name", uri),
)

if 'b' not in mode or explicit_encoding is not None:
Expand Down

0 comments on commit 643b782

Please sign in to comment.