Skip to content

Commit 03c2431

Browse files
committed
Python: fix QL alerts
1 parent 2e9c60d commit 03c2431

File tree

5 files changed

+5
-11
lines changed

5 files changed

+5
-11
lines changed

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module SyntheticPreUpdateNode {
7878
* that is mapped to the `self` parameter. That way, constructor calls represent the value of the
7979
* object after the constructor (currently only `__init__`) has run.
8080
*/
81-
CfgNode objectCreationNode() { result.getNode().(CallNode) = any(ClassCall c).getNode() }
81+
CfgNode objectCreationNode() { result.getNode() = any(ClassCall c).getNode() }
8282
}
8383

8484
import SyntheticPreUpdateNode

python/ql/lib/semmle/python/dataflow/new/internal/IterableUnpacking.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ predicate iterableUnpackingAssignmentFlowStep(Node nodeFrom, Node nodeTo) {
255255
*/
256256
predicate iterableUnpackingForReadStep(CfgNode nodeFrom, Content c, Node nodeTo) {
257257
exists(ForTarget target |
258-
nodeFrom.(CfgNode).getNode().getNode() = target.getSource() and
258+
nodeFrom.getNode().getNode() = target.getSource() and
259259
target instanceof SequenceNode and
260260
nodeTo = TIterableSequenceNode(target)
261261
) and

python/ql/test/experimental/dataflow/TestUtil/NormalTaintTrackingTest.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class DataFlowTest extends FlowTest {
1313
}
1414
}
1515

16-
query predicate missingAnnotationOnSINK(Location location, string error, string element) {
16+
query predicate missingAnnotationOnSink(Location location, string error, string element) {
1717
error = "ERROR, you should add `# $ MISSING: flow` annotation" and
1818
exists(DataFlow::Node sink |
1919
exists(DataFlow::CallCfgNode call |

python/ql/test/experimental/dataflow/TestUtil/RoutingTest.qll

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ abstract class RoutingTest extends InlineExpectationsTest {
4949

5050
pragma[inline]
5151
private string toFunc(DataFlow::Node toNode) {
52-
result =
53-
toNode
54-
.getEnclosingCallable()
55-
.(DataFlowPrivate::DataFlowCallable)
56-
.getCallableValue()
57-
.getScope()
58-
.getQualifiedName() // TODO: More robust pretty printing?
52+
result = toNode.getEnclosingCallable().getCallableValue().getScope().getQualifiedName() // TODO: More robust pretty printing?
5953
}
6054
}

python/ql/test/experimental/dataflow/testTaintConfig.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* s = SOURCE
99
* SINK(s)
1010
* ```
11-
* `SOURCE` will be a source and the second occurance of `s` will be a sink.
11+
* `SOURCE` will be a source and the second occurrence of `s` will be a sink.
1212
*
1313
* In order to test literals, alternative sources are defined for each type:
1414
*

0 commit comments

Comments
 (0)