Make some ruff fixes (#8154)

* Make some ruff fixes

* Undo manual fix

* Undo manual fix

* Updates from ruff=0.0.251
This commit is contained in:
Christian Clauss
2023-03-01 17:23:33 +01:00
committed by GitHub
parent 1c15cdff70
commit 64543faa98
73 changed files with 151 additions and 203 deletions

View File

@ -50,8 +50,8 @@ def get_pascal_triangle_unique_coefficients(depth: int) -> set[int]:
coefficients = {1}
previous_coefficients = [1]
for _ in range(2, depth + 1):
coefficients_begins_one = previous_coefficients + [0]
coefficients_ends_one = [0] + previous_coefficients
coefficients_begins_one = [*previous_coefficients, 0]
coefficients_ends_one = [0, *previous_coefficients]
previous_coefficients = []
for x, y in zip(coefficients_begins_one, coefficients_ends_one):
coefficients.add(x + y)