Python: address review comments

This commit is contained in:
Rasmus Lerchedahl Petersen
2024-05-17 16:25:22 +02:00
parent 92a5b6f6d6
commit 9534e56d1b
2 changed files with 3 additions and 3 deletions

View File

@@ -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.

View File

@@ -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`. */