from _typeshed import Incomplete
from typing import Any

def ordering_list(attr, count_from: Incomplete | None = None, **kw): ...

class OrderingList(list[Any]):
    ordering_attr: Any
    ordering_func: Any
    reorder_on_append: Any
    def __init__(
        self, ordering_attr: Incomplete | None = None, ordering_func: Incomplete | None = None, reorder_on_append: bool = False
    ) -> None: ...
    def reorder(self) -> None: ...
    def append(self, entity) -> None: ...
    def insert(self, index, entity) -> None: ...
    def remove(self, entity) -> None: ...
    def pop(self, index: int = -1): ...  # type: ignore[override]
    def __setitem__(self, index, entity) -> None: ...
    def __delitem__(self, index) -> None: ...
    def __setslice__(self, start, end, values) -> None: ...
    def __delslice__(self, start, end) -> None: ...
    def __reduce__(self): ...
