mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Merge pull request #1063 from taus-semmle/python-fix-compilation-warnings
Python: Fix compilation warnings.
This commit is contained in:
@@ -502,7 +502,7 @@ class Dict extends Dict_ {
|
||||
result = this.getAValue() or result = this.getAKey()
|
||||
}
|
||||
|
||||
AstNode getAChildNode() {
|
||||
override AstNode getAChildNode() {
|
||||
result = this.getAnItem()
|
||||
}
|
||||
|
||||
|
||||
@@ -1625,7 +1625,7 @@ module PointsTo {
|
||||
context.isRuntime() and
|
||||
exists(ControlFlowNode param |
|
||||
param = def.getDefiningNode() |
|
||||
varargs_points_to(param, cls) and value = theEmptyTupleObject() and origin = param
|
||||
varargs_points_to(param, cls) and value = TupleObject::empty() and origin = param
|
||||
or
|
||||
varargs_points_to(param, cls) and value = param and origin = param
|
||||
or
|
||||
|
||||
@@ -385,7 +385,7 @@ class ClassObject extends Object {
|
||||
result.getFunction().refersTo(this)
|
||||
}
|
||||
|
||||
predicate notClass() {
|
||||
override predicate notClass() {
|
||||
none()
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ class Object extends @py_object {
|
||||
or
|
||||
this = theFalseObject() and result = false
|
||||
or
|
||||
this = theEmptyTupleObject() and result = false
|
||||
this = TupleObject::empty() and result = false
|
||||
or
|
||||
exists(Tuple t | t = this.getOrigin() |
|
||||
exists(t.getAnElt()) and result = true
|
||||
|
||||
Reference in New Issue
Block a user