Skip to content

Commit e557d88

Browse files
committed
have the Instance token just be an alias for ReturnValue
1 parent f8281b4 commit e557d88

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

python/ql/lib/semmle/python/frameworks/data/internal/ApiGraphModelsSpecific.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ API::Node getExtraSuccessorFromNode(API::Node node, AccessPathToken token) {
5353
result = node.getMember(token.getAnArgument())
5454
or
5555
token.getName() = "Instance" and
56-
result = node.getASubclass*().getReturn() // In Python `Instance` is just an alias for `Subclass.ReturnValue`
56+
result = node.getReturn() // In Python `Instance` is just an alias for `ReturnValue`
5757
or
5858
token.getName() = "Awaited" and
5959
result = node.getAwaited()

python/ql/test/library-tests/frameworks/data/test.expected

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ isSource
6868
| test.py:39:11:39:20 | ControlFlowNode for Await | test-source |
6969
| test.py:41:8:41:27 | ControlFlowNode for Attribute() | test-source |
7070
| test.py:46:7:46:16 | ControlFlowNode for SubClass() | test-source |
71-
| test.py:51:8:51:18 | ControlFlowNode for Sub2Class() | test-source |
7271
| test.py:53:7:53:16 | ControlFlowNode for Attribute() | test-source |
7372
| test.py:60:13:60:16 | ControlFlowNode for self | test-source |
7473
| test.py:60:24:60:28 | ControlFlowNode for named | test-source |

python/ql/test/library-tests/frameworks/data/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class SubClass (CommonTokens.Super):
4848
class Sub2Class (CommonTokens.Class):
4949
pass
5050

51-
sub2 = Sub2Class()
51+
sub2 = Sub2Class() # TODO: Currently not recognized as an instance of CommonTokens.Class
5252

5353
val = inst.foo()
5454

0 commit comments

Comments
 (0)