Skip to content

Commit 2732a65

Browse files
committed
Python: Fix example snippets
One might argue that these should be rewritten entirely to use more modern APIs, but for now I'll be content with just having them compile properly.
1 parent 0a4ec2c commit 2732a65

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

python/ql/examples/snippets/call.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import python
10+
private import LegacyPointsTo
1011

1112
from Value len, CallNode call
1213
where len.getName() = "len" and len.getACall() = call

python/ql/examples/snippets/extend_class.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*/
1212

1313
import python
14+
private import LegacyPointsTo
1415

1516
from ClassObject sub, ClassObject base
1617
where

python/ql/examples/snippets/method_call.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import python
10+
private import LegacyPointsTo
1011

1112
from AstNode call, PythonFunctionValue method
1213
where

python/ql/examples/snippets/mutualrecursion.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import python
10+
private import LegacyPointsTo
1011

1112
from FunctionObject m, FunctionObject n
1213
where m != n and m.getACallee() = n and n.getACallee() = m

python/ql/examples/snippets/override_method.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import python
10+
private import LegacyPointsTo
1011

1112
from FunctionObject override, FunctionObject base
1213
where

python/ql/examples/snippets/recursion.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88

99
import python
10+
private import LegacyPointsTo
1011

1112
from PythonFunctionValue f
1213
where f.getACall().getScope() = f.getScope()

0 commit comments

Comments
 (0)