Python: Fix remaining deprecation warnings.

This commit is contained in:
Taus Brock-Nannestad
2020-04-16 14:02:55 +02:00
parent 922e52f061
commit 2d8770d17c
2 changed files with 6 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ predicate def_is_open(EssaDefinition def, ControlFlowNode open) {
passes_open_files(refinement)
)
or
exists(PyNodeRefinement refinement | refinement = def |
exists(EssaNodeRefinement refinement | refinement = def |
not closes_file(def) and
not wraps_file(refinement.getDefiningNode(), refinement.getInput()) and
var_is_open(refinement.getInput(), open)

View File

@@ -155,7 +155,7 @@ abstract class TaintKind extends string {
* For example, if this were a kind of string taint
* the `result` would be `theStrType()`.
*/
ClassValue getType() { result.(ClassObjectInternal).getSource() = this.getClass() }
ClassValue getType() { none() }
/**
* Gets the boolean values (may be one, neither, or both) that
@@ -180,7 +180,10 @@ abstract class TaintKind extends string {
TaintKind getTaintForIteration() { none() }
predicate flowStep(DataFlow::Node fromnode, DataFlow::Node tonode, string edgeLabel) {
this.additionalFlowStepVar(fromnode.asVariable(), tonode.asVariable()) and
exists(DataFlowExtension::DataFlowVariable v |
v = fromnode.asVariable() and
v.getASuccessorVariable() = tonode.asVariable()
) and
edgeLabel = "custom taint variable step"
}
}