Skip to content
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

Verbose function snippet #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Adding verbose function snippet
  • Loading branch information
dmc-au committed Aug 16, 2022
commit bc78b3d67684393586ea42a60a875ecdcf8319dc
12 changes: 12 additions & 0 deletions snippets/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,18 @@
"body": "async def ${1:fname}(${2:arg}):\n\t${3:pass}$0",
"description" : "Code snippet for async function definition."
},
"New verbose function": {
"prefix": "defv",
"body": [
"def ${1:fname}(${2:arg: type}) -> ${3:type}:",
"\t'''\n\t${4:Function definition.}\n",
"\t:param ${5:arg: first param}",
"\t:returns: ${7:return}\n\t'''\n",
"\t${10:return ${3:type}}",
"\n$0"
],
"description" : "Code snippet for verbose function definition."
},
"New property": {
"prefix": "property",
"body": "@property\ndef ${1:foo}(self):\n \"\"\"${2:The $1 property.}\"\"\"\n ${3:return self._$1}\n@${4:$1}.setter\ndef ${5:$1}(self, value):\n ${6:self._$1} = value",
Expand Down