Skip to content

Commit

Permalink
trying to understand CodeFactor
Browse files Browse the repository at this point in the history
  • Loading branch information
andped10 committed Nov 21, 2024
1 parent 2afb8dc commit 600e4ff
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/easyreflectometry/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,24 +83,24 @@ def count_free_parameters(self) -> int:
count = 0
for parameter in self.parameters:
if parameter.free:
count += 1
count = count + 1
return count

@property
def count_fixed_parameters(self) -> int:
count = 0
for parameter in self.parameters:
if not parameter.free:
count += 1
return count

@property
def count_parameter_user_constraints(self) -> int:
count = 0
parameters = self.parameters
for parameter in parameters:
count = count + len(parameter.user_constraints.keys())
return count
# @property
# def count_fixed_parameters(self) -> int:
# count = 0
# for parameter in self.parameters:
# if not parameter.free:
# count = count + 1
# return count

# @property
# def count_parameter_user_constraints(self) -> int:
# count = 0
# parameters = self.parameters
# for parameter in parameters:
# count = count + len(parameter.user_constraints.keys())
# return count

@property
def q_min(self):
Expand Down

0 comments on commit 600e4ff

Please sign in to comment.