Merge pull request #3505 from github/koesie10/fix-python-model-editor
Fix detection of Python instance methods
This commit is contained in:
Коммит
1739af4013
|
@ -112,7 +112,10 @@ export function pythonPath(
|
|||
export function pythonEndpointType(
|
||||
method: Omit<MethodDefinition, "endpointType">,
|
||||
): EndpointType {
|
||||
if (method.methodParameters.startsWith("(self,")) {
|
||||
if (
|
||||
method.methodParameters.startsWith("(self,") ||
|
||||
method.methodParameters === "(self)"
|
||||
) {
|
||||
return EndpointType.Method;
|
||||
}
|
||||
return EndpointType.Function;
|
||||
|
|
Загрузка…
Ссылка в новой задаче