Skip to content

Commit 2115cfd

Browse files
committed
refactor with ruff
1 parent c30e06d commit 2115cfd

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

chebifier/cli.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import importlib.resources
2-
import os
32

43
import click
54
import yaml
@@ -75,7 +74,7 @@ def predict(
7574
"""Predict ChEBI classes for SMILES strings using an ensemble model."""
7675
# Load configuration from YAML file
7776
if not ensemble_config:
78-
print(f"Using default ensemble configuration")
77+
print("Using default ensemble configuration")
7978
with (
8079
importlib.resources.files("chebifier")
8180
.joinpath("ensemble.yml")

chebifier/ensemble/base_ensemble.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def predict_smiles_list(
200200
)
201201
if len(predicted_classes) == 0:
202202
print(
203-
f"Warning: No classes have been predicted for the given SMILES list."
203+
"Warning: No classes have been predicted for the given SMILES list."
204204
)
205205
# save predictions
206206
torch.save(ordered_predictions, preds_file)

chebifier/prediction_models/nn_predictor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def predict_smiles_tuple(self, smiles_list: tuple[str]) -> list:
7676
)
7777
could_not_parse.append(i)
7878
continue
79-
except Exception as e:
79+
except Exception:
8080
could_not_parse.append(i)
8181
print(
8282
f"Model {self.model_name} failed to parse a SMILES string at position {i}: {smiles}"

0 commit comments

Comments
 (0)