ruff rule ANN204 missing-return-type-special-method (#15300)

This commit is contained in:
Christian Clauss
2026-09-12 21:35:04 +02:00
committed by GitHub
parent 7bd1e983c3
commit 0da45b148a
73 changed files with 125 additions and 121 deletions
+3 -3
View File
@@ -12,7 +12,7 @@ class Node:
- link to left, right and parent nodes
"""
def __init__(self, val):
def __init__(self, val) -> None:
self.val = val
# Number of nodes in left subtree
self.left_tree_size = 0
@@ -123,7 +123,7 @@ class BinomialHeap:
[17, 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 34]
"""
def __init__(self, bottom_root=None, min_node=None, heap_size=0):
def __init__(self, bottom_root=None, min_node=None, heap_size=0) -> None:
self.size = heap_size
self.bottom_root = bottom_root
self.min_node = min_node
@@ -384,7 +384,7 @@ class BinomialHeap:
else:
preorder.append(("#", level))
def __str__(self):
def __str__(self) -> str:
"""
Overwriting str for a pre-order print of nodes in heap;
Performance is poor, so use only for small examples