Enable ruff RUF005 rule

This commit is contained in:
MaximSmolskiy
2024-04-02 19:59:41 +03:00
parent f8cdb3e948
commit f5ed227553
4 changed files with 7 additions and 4 deletions

View File

@@ -45,7 +45,7 @@ def subset_combinations(elements: list[int], n: int) -> list:
for i in range(1, r + 1):
for j in range(i, 0, -1):
for prev_combination in dp[j - 1]:
dp[j].append(tuple(prev_combination) + (elements[i - 1],))
dp[j].append((*prev_combination, elements[i - 1]))
try:
return sorted(dp[n])