mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
Enable ruff RUF007 rule (#11349)
* Enable ruff RUF005 rule * Enable ruff RUF007 rule * Fix * Fix * Fix * Update sorts/bead_sort.py Co-authored-by: Christian Clauss <cclauss@me.com> * Update sorts/bead_sort.py * Revert "Update sorts/bead_sort.py" This reverts commit b10e5632e4479c2117c8b67113b5aa6545f127aa. * Revert "Update sorts/bead_sort.py" This reverts commit 2c1816bf102eeec5aa39cb2f1806afb64b672d14. * Update sorts/bead_sort.py --------- Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
@ -5,6 +5,7 @@ https://epaperpress.com/sortsearch/download/skiplist.pdf
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from itertools import pairwise
|
||||
from random import random
|
||||
from typing import Generic, TypeVar
|
||||
|
||||
@ -389,7 +390,7 @@ def test_delete_doesnt_leave_dead_nodes():
|
||||
|
||||
def test_iter_always_yields_sorted_values():
|
||||
def is_sorted(lst):
|
||||
return all(next_item >= item for item, next_item in zip(lst, lst[1:]))
|
||||
return all(next_item >= item for item, next_item in pairwise(lst))
|
||||
|
||||
skip_list = SkipList()
|
||||
for i in range(10):
|
||||
|
Reference in New Issue
Block a user