From 4d5e117c8b948eab7a1537157a9d5d302a396461 Mon Sep 17 00:00:00 2001 From: Edvard Rejthar Date: Thu, 24 Oct 2024 20:59:20 +0200 Subject: [PATCH] remote tests fix local tests kept working --- mininterface/tag.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mininterface/tag.py b/mininterface/tag.py index 4e1dfd5..8492b46 100644 --- a/mininterface/tag.py +++ b/mininterface/tag.py @@ -321,6 +321,13 @@ def __repr__(self): field_strings.append(f"{field.name}={v}") return f"{self.__class__.__name__}({', '.join(field_strings)})" + def __hash__(self): + # Once upon a time, github actions test stopped working with no hash function here. + # The tests for commit c108a6d passed on 2024-10-16. But strangely, the very same commit failed on 2024-10-24. + # Python patch version did not change. On the local machine, the tests work great with no obstacle. + # Hence, I add a hash function with no intention yet. + return hash(str(self)) + def _fetch_from(self, tag: "Self") -> "Self": """ Fetches attributes from another instance. (Skips the attributes that are already set.)