Skip to content

Commit b714e49

Browse files
authored
use the union type everywhere?
1 parent 0003cab commit b714e49

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dask_histogram/layers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import toolz
66
from dask.layers import Layer
77

8+
CallableOrNone = Union[Callable, None]
89

910
class MockableDataFrameTreeReduction(Layer):
1011
"""Mockable Tree-Reduction Layer
@@ -48,7 +49,7 @@ class MockableDataFrameTreeReduction(Layer):
4849
npartitions_input: int
4950
concat_func: Callable
5051
tree_node_func: Callable
51-
finalize_func: Union[Callable, None]
52+
finalize_func: CallableOrNone
5253
split_every: int
5354
split_out: int
5455
output_partitions: list[int]
@@ -63,7 +64,7 @@ def __init__(
6364
npartitions_input: int,
6465
concat_func: Callable,
6566
tree_node_func: Callable,
66-
finalize_func: Callable | None = None,
67+
finalize_func: CallableOrNone = None,
6768
split_every: int = 32,
6869
split_out: int | None = None,
6970
output_partitions: list[int] | None = None,

0 commit comments

Comments
 (0)