From 54af9dd10b4623acee070e8676b5e29aa1942f09 Mon Sep 17 00:00:00 2001 From: Taus Date: Tue, 24 Feb 2026 16:12:24 +0000 Subject: [PATCH] Python: Port ConsistentReturns.ql No test changes. --- python/ql/src/Functions/ConsistentReturns.ql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/ql/src/Functions/ConsistentReturns.ql b/python/ql/src/Functions/ConsistentReturns.ql index 9beeafc6372..c4ac492193e 100644 --- a/python/ql/src/Functions/ConsistentReturns.ql +++ b/python/ql/src/Functions/ConsistentReturns.ql @@ -12,7 +12,7 @@ */ import python -private import LegacyPointsTo +private import semmle.python.dataflow.new.internal.DataFlowDispatch predicate explicitly_returns_non_none(Function func) { exists(Return return | @@ -22,8 +22,8 @@ predicate explicitly_returns_non_none(Function func) { } predicate has_implicit_return(Function func) { - exists(ControlFlowNodeWithPointsTo fallthru | - fallthru = func.getFallthroughNode() and not fallthru.unlikelyReachable() + exists(ControlFlowNode fallthru | + fallthru = func.getFallthroughNode() and not Reachability::unlikelyReachable(fallthru) ) or exists(Return return | return.getScope() = func and not exists(return.getValue()))