-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
snippet for def classmethod #5560
Comments
Please provide more info,
|
Seems like this is instance method instead of class method. |
Can you please elaborate? With an example perhaps. I don't understand the issue here. Please fill the issue template |
Current behavior: When user typing def ${1:funcname}(self, ${2:parameter_list}):
${3:pass} Expected behavior: When user typing @classmethod
def ${1:funcname}(cls, ${2:parameter_list}):
${3:pass} Reason: The current behavior is not the class method, why did you name it class method ? |
Thanks a lot for elaborating. I see what you're saying. Prescribed solutionReplace
with
|
I would actually just name it "method" as that's what everyone is going to look for as the name. |
This looks like an easy fix that fell under the table. Shall I submit the PR? |
@janosh I would hold off as we are considering dropping all of our snippets. |
Interesting. Where is that being tracked? Ah, here: #14781 |
@janosh correct, we have no control over user-defined snippets, so you can totally have your own copy (or even create your own extension of Python snippets!). |
Snippets have been removed by #15006, so closing this as out of date. |
https://github.com/Microsoft/vscode-python/blob/b741e1af6d53cdf94765a6708964d489bd558ff8/snippets/python.json#L146-L153
should be
The text was updated successfully, but these errors were encountered: