From 19b33c6437d25fcb61bcb0eee76d064920a6be81 Mon Sep 17 00:00:00 2001 From: Bernardus Rendy <37468936+bernardusrendy@users.noreply.github.com> Date: Wed, 7 Aug 2024 20:05:25 -0700 Subject: [PATCH] pylint --- alab_management/experiment_view/experiment_view.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/alab_management/experiment_view/experiment_view.py b/alab_management/experiment_view/experiment_view.py index 4fdaa18..c2ec3fd 100644 --- a/alab_management/experiment_view/experiment_view.py +++ b/alab_management/experiment_view/experiment_view.py @@ -58,8 +58,7 @@ def create_experiment(self, experiment: InputExperiment) -> ObjectId: for sample in experiment["samples"]: if sample["sample_id"] is None: continue # ALabOS will assign a sample id, this is always safe - else: - sample["sample_id"] = ObjectId(sample["sample_id"]) + sample["sample_id"] = ObjectId(sample["sample_id"]) if self.sample_view.exists(sample_id=sample["sample_id"]): raise ValueError( f"Sample id {sample.sample_id} already exists in the database! Please use another id. This " @@ -69,8 +68,7 @@ def create_experiment(self, experiment: InputExperiment) -> ObjectId: for task in experiment["tasks"]: if task["task_id"] is None: continue - else: - task["task_id"] = ObjectId(task["task_id"]) + task["task_id"] = ObjectId(task["task_id"]) if self.task_view.exists(task_id=task["task_id"]): raise ValueError( f"Task id {task.task_id} already exists in the database! Please use another id. This experiment "