Skip to content

Commit

Permalink
Fix E275 errors (#141)
Browse files Browse the repository at this point in the history
  • Loading branch information
johannfaouzi committed Dec 5, 2022
1 parent b74f43c commit 2434592
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pyts/datasets/ucr.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,10 +268,10 @@ def _load_ucr_dataset(dataset, path):
"""
new_path = path + dataset + '/'
try:
with(open(new_path + dataset + '.txt', encoding='utf-8')) as f:
with open(new_path + dataset + '.txt', encoding='utf-8') as f:
description = f.read()
except UnicodeDecodeError:
with(open(new_path + dataset + '.txt', encoding='ISO-8859-1')) as f:
with open(new_path + dataset + '.txt', encoding='ISO-8859-1') as f:
description = f.read()
try:
data_train = np.genfromtxt(new_path + dataset + '_TRAIN.txt')
Expand Down
6 changes: 3 additions & 3 deletions pyts/datasets/uea.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,11 @@ def _load_uea_dataset(dataset, path):

if description_file is not None:
try:
with(open(new_path + description_file, encoding='utf-8')) as f:
with open(new_path + description_file, encoding='utf-8') as f:
description = f.read()
except UnicodeDecodeError:
with(open(new_path + description_file,
encoding='ISO-8859-1')) as f:
with open(new_path + description_file,
encoding='ISO-8859-1') as f:
description = f.read()
else:
description = None
Expand Down

0 comments on commit 2434592

Please sign in to comment.