Skip to content

Commit f0a5ea2

Browse files
committed
Fix typing issues caused due to older python version
1 parent 8ea4165 commit f0a5ea2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pydatastructs/graphs/algorithms.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from pydatastructs.graphs.graph import Graph
1212
from pydatastructs.linear_data_structures.algorithms import merge_sort_parallel
1313
from pydatastructs import PriorityQueue
14+
from typing import Tuple, Dict
1415

1516
__all__ = [
1617
'breadth_first_search',
@@ -1220,7 +1221,7 @@ def max_flow(graph, source, sink, algorithm='edmonds_karp', **kwargs):
12201221
"performing max flow on graphs.")
12211222
return getattr(algorithms, func)(graph, source, sink)
12221223

1223-
def bipartite_coloring(graph: Graph, **kwargs) -> tuple[bool, dict]:
1224+
def bipartite_coloring(graph: Graph, **kwargs) -> Tuple[bool, Dict]:
12241225
"""
12251226
Finds a 2-coloring of the given graph if it is bipartite.
12261227
@@ -1479,7 +1480,7 @@ def dfs(u):
14791480
return matching
14801481

14811482

1482-
def maximum_matching_parallel(graph: Graph, algorithm: str, num_threads: int, **kwargs):
1483+
def maximum_matching_parallel(graph: Graph, algorithm: str, num_threads: int, **kwargs) -> set:
14831484
"""
14841485
Finds the maximum matching in the given graph using the given algorithm using
14851486
the given number of threads.

0 commit comments

Comments
 (0)