Skip to content

Commit 8956731

Browse files
committed
Fix detection of Python instance methods
1 parent 161fe3d commit 8956731

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

extensions/ql-vscode/src/model-editor/languages/python/access-paths.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ export function pythonPath(
112112
export function pythonEndpointType(
113113
method: Omit<MethodDefinition, "endpointType">,
114114
): EndpointType {
115-
if (method.methodParameters.startsWith("(self,")) {
115+
if (
116+
method.methodParameters.startsWith("(self,") ||
117+
method.methodParameters === "(self)"
118+
) {
116119
return EndpointType.Method;
117120
}
118121
return EndpointType.Function;

0 commit comments

Comments
 (0)