Skip to content

Commit e1c3d3d

Browse files
committed
fix ruff
1 parent f02c21f commit e1c3d3d

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

petab/v2/lint.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -510,9 +510,7 @@ def run(self, problem: Problem) -> ValidationIssue | None:
510510
# Check that there are no duplicate timepoints
511511
counter = Counter(period.time for period in experiment.periods)
512512
duplicates = sorted(
513-
time
514-
for time, count in counter.items()
515-
if count > 1
513+
time for time, count in counter.items() if count > 1
516514
)
517515
if duplicates:
518516
messages.append(
@@ -912,8 +910,8 @@ def run(self, problem: Problem) -> ValidationIssue | None:
912910
# modelEntityId columns, occurs only once
913911
must_be_unique_ids = []
914912
for mapping in problem.mappings:
915-
petab_id := getattr(mapping, "petab_id"):
916-
model_id := getattr(mapping, "model_id"):
913+
petab_id = getattr(mapping, "petab_id", None)
914+
model_id = getattr(mapping, "model_id", None)
917915

918916
if petab_id:
919917
must_be_unique_ids.append(petab_id)

0 commit comments

Comments
 (0)