mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Python: Fix Python 3 tests
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleObject m
|
from ModuleObject m
|
||||||
/* Exclude the builtins module as it has a different name under 2 and 3. */
|
/* Exclude the builtins module as it has a different name under 2 and 3. */
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ExceptFlowNode ex, Value val
|
from ExceptFlowNode ex, Value val
|
||||||
where ex.handledException(val, _, _)
|
where ex.handledException(val, _, _)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from RaisingNode r
|
from RaisingNode r
|
||||||
select r.getLocation().getStartLine(), r.toString(), r.getARaisedType().toString()
|
select r.getLocation().getStartLine(), r.toString(), r.getARaisedType().toString()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ControlFlowNode r, ControlFlowNode s
|
from ControlFlowNode r, ControlFlowNode s
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from RaisingNode r
|
from RaisingNode r
|
||||||
where r.raisesUnknownType()
|
where r.raisesUnknownType()
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
import semmle.python.pointsto.PointsTo
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ControlFlowNode f, Context c, boolean b
|
from ControlFlowNode f, Context c, boolean b
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Call c, FunctionObject f
|
from Call c, FunctionObject f
|
||||||
where f.getACall().getNode() = c
|
where f.getACall().getNode() = c
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls
|
from ClassObject cls
|
||||||
where not cls.isC()
|
where not cls.isC()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
// as used in semmle.python.filters.Tests
|
// as used in semmle.python.filters.Tests
|
||||||
from ClassValue c, string base
|
from ClassValue c, string base
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, int line, string name, Object obj
|
from ClassObject cls, int line, string name, Object obj
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, int line, string name
|
from ClassObject cls, int line, string name
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls
|
from ClassObject cls
|
||||||
where not cls.isC()
|
where not cls.isC()
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, ClassObject l, ClassObject r
|
from ClassObject cls, ClassObject l, ClassObject r
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, ClassObject sup, int index
|
from ClassObject cls, ClassObject sup, int index
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleObject m, string name
|
from ModuleObject m, string name
|
||||||
where not m.isC() and not m.getName() = "__future__"
|
where not m.isC() and not m.getName() = "__future__"
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleObject m, string name
|
from ModuleObject m, string name
|
||||||
where not m.isC()
|
where not m.isC()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleObject m, string name
|
from ModuleObject m, string name
|
||||||
where not m.isC() and m.exports(name)
|
where not m.isC() and m.exports(name)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleObject m, string name
|
from ModuleObject m, string name
|
||||||
where not m.isC() and m.importedAs(name)
|
where not m.isC() and m.importedAs(name)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ModuleValue mv, string usage
|
from ModuleValue mv, string usage
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, ClassObject sup
|
from ClassObject cls, ClassObject sup
|
||||||
where not cls.isC()
|
where not cls.isC()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PyFunctionObject f, string type
|
from PyFunctionObject f, string type
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from RaisingNode r, ControlFlowNode n, ClassObject ex
|
from RaisingNode r, ControlFlowNode n, ClassObject ex
|
||||||
where r.viableExceptionEdge_objectapi(n, ex)
|
where r.viableExceptionEdge_objectapi(n, ex)
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from FunctionObject func, ControlFlowNode call
|
from FunctionObject func, ControlFlowNode call
|
||||||
where func.getACall() = call
|
where func.getACall() = call
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from FunctionObject func
|
from FunctionObject func
|
||||||
where func.neverReturns()
|
where func.neverReturns()
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from PyFunctionObject func, ClassObject ret_type
|
from PyFunctionObject func, ClassObject ret_type
|
||||||
where func.getAnInferredReturnType() = ret_type
|
where func.getAnInferredReturnType() = ret_type
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from Scope s, string name, Object val
|
from Scope s, string name, Object val
|
||||||
where
|
where
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import python
|
import python
|
||||||
|
private import LegacyPointsTo
|
||||||
|
|
||||||
from ClassObject cls, string name, BuiltinPropertyObject p
|
from ClassObject cls, string name, BuiltinPropertyObject p
|
||||||
where
|
where
|
||||||
|
|||||||
Reference in New Issue
Block a user