mercurial/thirdparty/attr/_cmp.pyi
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 11 Mar 2025 02:29:42 +0100
branchstable
changeset 53042 cdd7bf612c7b
parent 49643 e1c586b9a43c
permissions -rw-r--r--
bundle-spec: properly format boolean parameter (issue6960) This was breaking automatic clone bundle generation. This changeset fixes it and add a test to catch it in the future.

from typing import Any, Callable, Optional, Type

_CompareWithType = Callable[[Any, Any], bool]

def cmp_using(
    eq: Optional[_CompareWithType],
    lt: Optional[_CompareWithType],
    le: Optional[_CompareWithType],
    gt: Optional[_CompareWithType],
    ge: Optional[_CompareWithType],
    require_same_type: bool,
    class_name: str,
) -> Type: ...