From 64bb71d7c12881cf544b3ee22a76a6e5224bae2d Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Sun, 23 Jan 2022 20:59:56 +0300 Subject: [PATCH] Improve `>`, `<`, etc for `UUID` type (#7001) --- stdlib/uuid.pyi | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/stdlib/uuid.pyi b/stdlib/uuid.pyi index 782c0491f..70e4a6133 100644 --- a/stdlib/uuid.pyi +++ b/stdlib/uuid.pyi @@ -1,5 +1,4 @@ import sys -from typing import Any # Because UUID has properties called int and bytes we need to rename these temporarily. _Int = int @@ -71,11 +70,11 @@ class UUID: @property def version(self) -> _Int | None: ... def __int__(self) -> _Int: ... - def __eq__(self, other: Any) -> bool: ... - def __lt__(self, other: Any) -> bool: ... - def __le__(self, other: Any) -> bool: ... - def __gt__(self, other: Any) -> bool: ... - def __ge__(self, other: Any) -> bool: ... + def __eq__(self, other: object) -> bool: ... + def __lt__(self, other: UUID) -> bool: ... + def __le__(self, other: UUID) -> bool: ... + def __gt__(self, other: UUID) -> bool: ... + def __ge__(self, other: UUID) -> bool: ... def getnode() -> int: ... def uuid1(node: _Int | None = ..., clock_seq: _Int | None = ...) -> UUID: ...