summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2023-05-01 09:39:36 -0700
committerGitHub <noreply@github.com>2023-05-01 19:39:36 +0300
commit301b52b089a1d43f34976c0472521adc571e10d7 (patch)
treed2931653a0c8fbc821b86d8a139894a3e788eec0
parenta896cc0dd72afbb51afcdd5c52263f103bc1e859 (diff)
downloadnetworkx-301b52b089a1d43f34976c0472521adc571e10d7.tar.gz
Rm unreachable code for validating input (#6675)
Rm un-hittable validation lines.
-rw-r--r--networkx/algorithms/approximation/connectivity.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/networkx/algorithms/approximation/connectivity.py b/networkx/algorithms/approximation/connectivity.py
index a9190620..626efba9 100644
--- a/networkx/algorithms/approximation/connectivity.py
+++ b/networkx/algorithms/approximation/connectivity.py
@@ -357,12 +357,6 @@ def _bidirectional_shortest_path(G, source, target, exclude):
def _bidirectional_pred_succ(G, source, target, exclude):
# does BFS from both source and target and meets in the middle
# excludes nodes in the container "exclude" from the search
- if source is None or target is None:
- raise nx.NetworkXException(
- "Bidirectional shortest path called without source or target"
- )
- if target == source:
- return ({target: None}, {source: None}, source)
# handle either directed or undirected
if G.is_directed():