Skip to content

Commit 7de99ff

Browse files
committed
changed string type checking
1 parent 9ec141c commit 7de99ff

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

openml/datasets/dataset.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,14 @@ def __init__(self, dataset_id=None, name=None, version=None, description=None,
6565
self.default_target_attribute = default_target_attribute
6666
self.row_id_attribute = row_id_attribute
6767
self.ignore_attributes = None
68-
if isinstance(ignore_attribute, str):
68+
if type(ignore_attribute) == str:
6969
self.ignore_attributes = [ignore_attribute]
70-
elif isinstance(ignore_attribute, list):
70+
elif type(ignore_attribute) == list:
7171
self.ignore_attributes = ignore_attribute
7272
elif ignore_attribute is None:
7373
pass
7474
else:
75-
raise ValueError('wrong data type for ignore_attribute. Should be list. ')
75+
raise ValueError('wrong data type for ignore_attribute. Should be list (or string). ')
7676
self.version_label = version_label
7777
self.citation = citation
7878
self.tag = tag

0 commit comments

Comments
 (0)