We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc431a4 commit e7e4766Copy full SHA for e7e4766
1 file changed
pytools/graph.py
@@ -191,6 +191,7 @@ def __init__(self, node):
191
self.node = node
192
193
194
+@dataclass(frozen=True)
195
class HeapEntry:
196
"""
197
Helper class to compare associated keys while comparing the elements in
@@ -199,9 +200,8 @@ class HeapEntry:
199
200
Only needs to define :func:`pytools.graph.__lt__` according to
201
<https://github.com/python/cpython/blob/8d21aa21f2cbc6d50aab3f420bb23be1d081dac4/Lib/heapq.py#L135-L138>.
202
- def __init__(self, node, key):
203
- self.node = node
204
- self.key = key
+ node: Any
+ key: Any
205
206
def __lt__(self, other):
207
return self.key < other.key
0 commit comments