Skip to content

Add async function definition #11

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

Merged
merged 1 commit into from
Mar 2, 2021
Merged
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
7 changes: 6 additions & 1 deletion snippets/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@
"body": "def ${1:fname}(${2:arg}):\n\t${3:pass}$0",
"description" : "Code snippet for function definition."
},
"New async function": {
"prefix": "adef",
"body": "async def ${1:fname}(${2:arg}):\n\t${3:pass}$0",
"description" : "Code snippet for async 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 Expand Up @@ -120,4 +125,4 @@
"body": "if __name__ == \"__main__\":\n\t${1:main()}$0",
"description" : "Create implicitly all the code at the top level using the __name__ special variable."
}
}
}