Skip to content

Commit

Permalink
Fixing code formatting issues reported by flake8
Browse files Browse the repository at this point in the history
Signed-off-by: Teodor Parvanov <[email protected]>
  • Loading branch information
teoparvanov committed Nov 8, 2024
1 parent 39aacfc commit 74f1315
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions openfl-workspace/keras_cnn_mnist/src/tfmnist_inmemory.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def __init__(self, data_path, batch_size, **kwargs):
# collaborator list.
try:
int(data_path)
except:
except ValueError:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ def __init__(self, data_path, batch_size, **kwargs):
# collaborator list.
try:
int(data_path)
except:
except ValueError:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down
6 changes: 3 additions & 3 deletions openfl-workspace/torch_cnn_histology/src/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ def __init__(self, data_path, batch_size, **kwargs):

try:
int(data_path)
except:
except ValueError:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down
4 changes: 2 additions & 2 deletions openfl-workspace/torch_cnn_mnist/src/dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def __init__(self, data_path, batch_size, **kwargs):
int(data_path)
except:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def __init__(self, data_path, batch_size, **kwargs):
int(data_path)
except:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def __init__(self, data_path, batch_size, **kwargs):
int(data_path)
except:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def __init__(self, data_path, batch_size, **kwargs):
int(data_path)
except:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down
4 changes: 2 additions & 2 deletions openfl-workspace/torch_unet_kvasir/src/data_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def __init__(self, data_path, batch_size, **kwargs):
int(data_path)
except:
raise ValueError(
"Expected `%s` to be representable as `int`, as it refers to the data shard " +
"number used by the collaborator.",
"Expected `%s` to be representable as `int`, as it refers to the data shard "
+ "number used by the collaborator.",
data_path
)

Expand Down

0 comments on commit 74f1315

Please sign in to comment.