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:
Maxim Smolskiy
2024-04-20 17:20:27 +03:00
committed by GitHub
parent 42593489d9
commit 7b88e15b1c
3 changed files with 3 additions and 3 deletions

View File

@ -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):