Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

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
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