From ed4273957c4a95ee34fe13044d2991b3b94f8c99 Mon Sep 17 00:00:00 2001 From: IWATSURU Toshiki <43693727+turutcrane@users.noreply.github.com> Date: Tue, 30 May 2023 20:53:42 +0900 Subject: [PATCH] Fix infinte call in sort of PathEntry --- src/pythonfinder/models/mixins.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/pythonfinder/models/mixins.py b/src/pythonfinder/models/mixins.py index fb252b4..58ce99a 100644 --- a/src/pythonfinder/models/mixins.py +++ b/src/pythonfinder/models/mixins.py @@ -68,6 +68,9 @@ def __gt__(self, other) -> bool: def __gte__(self, other) -> bool: return self.path.as_posix() >= other.path.as_posix() + def __eq__(self, other) -> bool: + return self.path.as_posix() == other.path.as_posix() + def which(self, name) -> PathEntry | None: """Search in this path for an executable.