Python: Fix Python 3 tests

This commit is contained in:
Taus
2025-10-30 23:08:11 +00:00
parent 85029bd77d
commit 665104e626
27 changed files with 27 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ModuleObject m
/* Exclude the builtins module as it has a different name under 2 and 3. */

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ExceptFlowNode ex, Value val
where ex.handledException(val, _, _)

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from RaisingNode r
select r.getLocation().getStartLine(), r.toString(), r.getARaisedType().toString()

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ControlFlowNode r, ControlFlowNode s
where

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from RaisingNode r
where r.raisesUnknownType()

View File

@@ -1,5 +1,5 @@
import python
import semmle.python.pointsto.PointsTo
private import LegacyPointsTo
from ControlFlowNode f, Context c, boolean b
where

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from Call c, FunctionObject f
where f.getACall().getNode() = c

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ClassObject cls
where not cls.isC()

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
// as used in semmle.python.filters.Tests
from ClassValue c, string base

View File

@@ -5,6 +5,7 @@
*/
import python
private import LegacyPointsTo
from ClassObject cls, int line, string name, Object obj
where

View File

@@ -5,6 +5,7 @@
*/
import python
private import LegacyPointsTo
from ClassObject cls, int line, string name
where

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ClassObject cls
where not cls.isC()

View File

@@ -5,6 +5,7 @@
*/
import python
private import LegacyPointsTo
from ClassObject cls, ClassObject l, ClassObject r
where

View File

@@ -5,6 +5,7 @@
*/
import python
private import LegacyPointsTo
from ClassObject cls, ClassObject sup, int index
where

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ModuleObject m, string name
where not m.isC() and not m.getName() = "__future__"

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ModuleObject m, string name
where not m.isC()

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ModuleObject m, string name
where not m.isC() and m.exports(name)

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ModuleObject m, string name
where not m.isC() and m.importedAs(name)

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ModuleValue mv, string usage
where

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ClassObject cls, ClassObject sup
where not cls.isC()

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from PyFunctionObject f, string type
where

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from RaisingNode r, ControlFlowNode n, ClassObject ex
where r.viableExceptionEdge_objectapi(n, ex)

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from FunctionObject func, ControlFlowNode call
where func.getACall() = call

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from FunctionObject func
where func.neverReturns()

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from PyFunctionObject func, ClassObject ret_type
where func.getAnInferredReturnType() = ret_type

View File

@@ -6,6 +6,7 @@
*/
import python
private import LegacyPointsTo
from Scope s, string name, Object val
where

View File

@@ -1,4 +1,5 @@
import python
private import LegacyPointsTo
from ClassObject cls, string name, BuiltinPropertyObject p
where