Fix detection of Python instance methods
This commit is contained in:
@@ -112,7 +112,10 @@ export function pythonPath(
|
|||||||
export function pythonEndpointType(
|
export function pythonEndpointType(
|
||||||
method: Omit<MethodDefinition, "endpointType">,
|
method: Omit<MethodDefinition, "endpointType">,
|
||||||
): EndpointType {
|
): EndpointType {
|
||||||
if (method.methodParameters.startsWith("(self,")) {
|
if (
|
||||||
|
method.methodParameters.startsWith("(self,") ||
|
||||||
|
method.methodParameters === "(self)"
|
||||||
|
) {
|
||||||
return EndpointType.Method;
|
return EndpointType.Method;
|
||||||
}
|
}
|
||||||
return EndpointType.Function;
|
return EndpointType.Function;
|
||||||
|
|||||||
Reference in New Issue
Block a user