mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 09:21:13 +08:00
[mypy] Type annotations for graphs/finding_bridges.py
and graphs/random_graph_generator.py
(#5795)
* [mypy] Annotate `graphs/finding_bridges.py` * Remove from excluded in `mypy.ini` * Add doctest.testmod() * psf/black formatting * Annotations for `graphs/random_graph_generator.py` * Remove from excluded in `mypy.ini` * Resolve merge conflict * Resolve merge conflict * Update mypy.ini * Update mypy.ini * Remove from excluded
This commit is contained in:

committed by
GitHub

parent
ac4bdfd66d
commit
a8aeabdf18
@ -26,7 +26,7 @@ def random_graph(
|
||||
>>> random_graph(4, 0.5, True)
|
||||
{0: [1], 1: [2, 3], 2: [3], 3: []}
|
||||
"""
|
||||
graph = {i: [] for i in range(vertices_number)}
|
||||
graph: dict = {i: [] for i in range(vertices_number)}
|
||||
|
||||
# if probability is greater or equal than 1, then generate a complete graph
|
||||
if probability >= 1:
|
||||
|
Reference in New Issue
Block a user