Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

Commit

Permalink
fix: correct lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Dec 24, 2024
1 parent ec05ddd commit 80b5ea2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions herkoole/knapsack/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ def __str__(self) -> str:
for i, gene in enumerate(self.genes):
if gene is True:
total_weight += self.model.weights[i]
total_value += self.model.values[i] # noqa: PD011
total_value += self.model.values[i]

genes = "\n".join(
f"\t - {i}: weight: {self.model.weights[i]}"
f", value: {self.model.values[i]}" # noqa: PD011
f", value: {self.model.values[i]}"
for i, gene in enumerate(self.genes)
if gene is True
)
Expand All @@ -86,7 +86,7 @@ def fitness(self) -> float:
for i, gene in enumerate(self.genes):
if gene is True:
total_weight += self.model.weights[i]
total_value += self.model.values[i] # noqa: PD011
total_value += self.model.values[i]

fitness = total_value

Expand Down

0 comments on commit 80b5ea2

Please sign in to comment.