Source code for app.portfolio.collections.ordered_view.protocols

# SPDX-License-Identifier: GPLv3-or-later
# Copyright © 2025 pygaindalf Rui Pinheiro

from typing import TYPE_CHECKING, Protocol, runtime_checkable


if TYPE_CHECKING:
    from _typeshed import SupportsRichComparison

    from ..journalled.collection import JournalledCollection


[docs] @runtime_checkable class SortKeyProtocol(Protocol):
[docs] def sort_key(self) -> SupportsRichComparison: ...
[docs] @runtime_checkable class HasJournalledTypeCollectionProtocol(Protocol):
[docs] @classmethod def get_journalled_type(cls) -> type[JournalledCollection]: ...
def __contains__(self, item: object) -> bool: ...