mirror of
https://github.com/TheAlgorithms/Python.git
synced 2026-09-29 17:08:49 +08:00
ruff rule ANN204 missing-return-type-special-method (#15300)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user