Skip to content

Commit ad5dc9a

Browse files
committed
CSVReader - Remove string type check for file name
1 parent 5a13bf4 commit ad5dc9a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

Orange/data/io.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,7 @@ def read(self):
164164
skipinitialspace=True,
165165
)
166166
data = self.data_table(reader)
167-
168-
# TODO: Name can be set unconditionally when/if
169-
# self.filename will always be a string with the file name.
170-
# Currently, some tests pass StringIO instead of
171-
# the file name to a reader.
172-
if isinstance(self.filename, str):
173-
data.name = path.splitext(
174-
path.split(self.filename)[-1])[0]
167+
data.name = path.splitext(path.split(self.filename)[-1])[0]
175168
if error and isinstance(error, UnicodeDecodeError):
176169
pos, endpos = error.args[2], error.args[3]
177170
warning = ('Skipped invalid byte(s) in position '

0 commit comments

Comments
 (0)