Skip to content

Commit 0dd55ee

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2f2f012 commit 0dd55ee

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

genetic_algorithm/knapsack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ def run_ga(
318318

319319
if __name__ == "__main__":
320320
result = run_ga(items, capacity)
321-
best_items = [items[idx] for idx, bit in enumerate(result["best_genome"]) if bit == 1]
321+
best_items = [
322+
items[idx] for idx, bit in enumerate(result["best_genome"]) if bit == 1
323+
]
322324

323325
print(f"Knapsack capacity: {result['capacity']}")
324326
print(

0 commit comments

Comments
 (0)