mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-03-13 09:50:19 +08:00
Enable ruff RUF005 rule
This commit is contained in:
@@ -33,7 +33,7 @@ def odd_sieve(num: int) -> list[int]:
|
||||
0, ceil((num - i_squared) / (i << 1))
|
||||
)
|
||||
|
||||
return [2] + list(compress(range(3, num, 2), sieve))
|
||||
return [2, *list(compress(range(3, num, 2), sieve))]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user