mirror of
https://github.com/github/codeql.git
synced 2026-04-30 03:05:15 +02:00
Python: Fix query tests
Mostly just adding `private import LegacyPointsTo`. Sometimes getting rid of other imports that are superceded by that module.
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
private import semmle.python.objects.ObjectInternal
|
||||
private import semmle.python.objects.ObjectAPI
|
||||
|
||||
/** Holds if the comparison `comp` uses `is` or `is not` (represented as `op`) to compare its `left` and `right` arguments. */
|
||||
predicate comparison_using_is(Compare comp, ControlFlowNode left, Cmpop op, ControlFlowNode right) {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
import python
|
||||
import IsComparisons
|
||||
private import LegacyPointsTo
|
||||
|
||||
from Compare comp, Cmpop op, ClassValue c
|
||||
where
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/** Helper functions for queries that test redundant comparisons. */
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
|
||||
/** A comparison where the left and right hand sides appear to be identical. */
|
||||
class RedundantComparison extends Compare {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
import python
|
||||
import Expressions.CallArgs
|
||||
private import LegacyPointsTo
|
||||
|
||||
from Call call, FunctionObject func, string name
|
||||
where
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
|
||||
import python
|
||||
import LegacyPointsTo
|
||||
import semmle.python.objects.ObjectInternal
|
||||
import semmle.python.strings
|
||||
|
||||
predicate string_format(BinaryExpr operation, StringLiteral str, Value args, AstNode origin) {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
|
||||
import python
|
||||
private import LegacyPointsTo
|
||||
import CallArgs
|
||||
|
||||
from Call call, FunctionValue func, string too, string should, int limit
|
||||
|
||||
Reference in New Issue
Block a user