summaryrefslogtreecommitdiff
path: root/lib/python/qmk/build_targets.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/qmk/build_targets.py')
-rw-r--r--lib/python/qmk/build_targets.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/python/qmk/build_targets.py b/lib/python/qmk/build_targets.py
index fc72022049..16a7ef87a2 100644
--- a/lib/python/qmk/build_targets.py
+++ b/lib/python/qmk/build_targets.py
@@ -31,6 +31,17 @@ class BuildTarget:
def __repr__(self):
return f'BuildTarget(keyboard={self.keyboard}, keymap={self.keymap})'
+ def __eq__(self, __value: object) -> bool:
+ if not isinstance(__value, BuildTarget):
+ return False
+ return self.__repr__() == __value.__repr__()
+
+ def __ne__(self, __value: object) -> bool:
+ return not self.__eq__(__value)
+
+ def __hash__(self) -> int:
+ return self.__repr__().__hash__()
+
def configure(self, parallel: int = None, clean: bool = None, compiledb: bool = None) -> None:
if parallel is not None:
self._parallel = parallel