From 877e133eecb424bc2bcda5ebb8a0e4661137de89 Mon Sep 17 00:00:00 2001 From: Alex Tavarez Date: Wed, 7 Jan 2026 23:26:17 -0500 Subject: [PATCH] feature: added equality comparison magic method counterparts --- sshkey_man.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sshkey_man.py b/sshkey_man.py index e4b0afd..8614867 100644 --- a/sshkey_man.py +++ b/sshkey_man.py @@ -84,9 +84,15 @@ class SSHKey: def __eq__(self, other: Self) -> bool: return self.__value == other._SSHKey__value + def __ne__(self, other: Self) -> bool | Never: + return self.__value != other._SSHKey__value + def __eqcontent__(self, other: Self) -> bool: return self.__value.read_text() == other._SSHKey__value.read_text() + def __neqcontent__(self, other: Self) -> bool: + return self.__value.read_text() != other._SSHKey__value.read_text() + def __add__(self, other: Self | ExecutedPath | str): raise NotImplementedError