mirror of
https://github.com/github/codeql.git
synced 2026-04-26 01:05:15 +02:00
Python: address review comments
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
---
|
||||
category: feature
|
||||
---
|
||||
* A Python MaD row may now contain a dotted path in the `type` column. Like in Ruby, a path to a class will refer to instances. This means that the summary `["foo", "Member[MyClass].Instance.Member[instance_method]", "Argument[0]", "ReturnValue", "value"]` can now be written `["foo.MS_Class", "Member[instance_method]", "Argument[0]", "ReturnValue", "value"]`. To refer to an actual class, one may add a `!` at the end of the path.
|
||||
* A Python Models as Data row may now contain a dotted path in the `type` column. Like in Ruby, a path to a class will refer to instances. This means that the summary `["foo", "Member[MyClass].Instance.Member[instance_method]", "Argument[0]", "ReturnValue", "value"]` can now be written `["foo.MS_Class", "Member[instance_method]", "Argument[0]", "ReturnValue", "value"]`. To refer to an actual class, one may add a `!` at the end of the path.
|
||||
@@ -68,7 +68,7 @@ private string getTypePathComponent(string typePath, int n) {
|
||||
result = typePath.splitAt(".", n)
|
||||
}
|
||||
|
||||
private int getNumTypePathomponents(string typePath) {
|
||||
private int getNumTypePathComponents(string typePath) {
|
||||
result = strictcount(int n | exists(getTypePathComponent(typePath, n)))
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ private API::Node getNodeFromTypePath(string typePath, int n) {
|
||||
}
|
||||
|
||||
private API::Node getNodeFromTypePath(string typePath) {
|
||||
result = getNodeFromTypePath(typePath, getNumTypePathomponents(typePath))
|
||||
result = getNodeFromTypePath(typePath, getNumTypePathComponents(typePath))
|
||||
}
|
||||
|
||||
/** Gets a Python-specific interpretation of the given `type`. */
|
||||
|
||||
Reference in New Issue
Block a user