From 2b1032bf7c84cfcef7a552afe903884215fd1ef2 Mon Sep 17 00:00:00 2001 From: Andreas Pedersen Date: Thu, 21 Nov 2024 10:43:42 +0100 Subject: [PATCH] code factor --- src/easyreflectometry/project.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/easyreflectometry/project.py b/src/easyreflectometry/project.py index d5df4133..65c9a433 100644 --- a/src/easyreflectometry/project.py +++ b/src/easyreflectometry/project.py @@ -453,9 +453,9 @@ def _timestamp_modification(self): def free_parameters_count(self) -> int: count = 0 - for parameter in self.parameters: - # if parameter: - count = count + 1 + for i in range(len(self.parameters)): + if self.parameters[i].free: + count = count + 1 return count # return sum(1 for parameter in self.parameters if parameter.free)