We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
RaisingTuple.ql
poins-to
1 parent 2223bc3 commit 93fcaf2Copy full SHA for 93fcaf2
python/ql/src/Exceptions/RaisingTuple.ql
@@ -10,11 +10,14 @@
10
*/
11
12
import python
13
+import semmle.python.dataflow.new.DataFlow
14
-from Raise r, Value v, AstNode origin
15
+from Raise r, DataFlow::LocalSourceNode origin
16
where
- r.getException().pointsTo(v, origin) and
17
- v.getClass() = ClassValue::tuple() and
+ exists(DataFlow::Node exception | exception.asExpr() = r.getException() |
18
+ origin.flowsTo(exception)
19
+ ) and
20
+ origin.asExpr() instanceof Tuple and
21
major_version() = 2
22
/* Raising a tuple is a type error in Python 3, so is handled by the IllegalRaise query. */
23
select r,
0 commit comments