You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
796 B
44 lines
796 B
10 years ago
|
snippet #py "Set the python environment."
|
||
|
#!/usr/bin/env python
|
||
10 years ago
|
# -*- encoding: utf-8 -*-
|
||
10 years ago
|
|
||
|
"""${1:Module documentation}"""
|
||
10 years ago
|
|
||
10 years ago
|
$0
|
||
|
endsnippet
|
||
|
|
||
|
snippet class "Starting a Python class"
|
||
10 years ago
|
class ${1:ClassName}(${2:object}):
|
||
10 years ago
|
|
||
|
"""${3:Class documentation}"""
|
||
|
|
||
|
$0
|
||
|
endsnippet
|
||
|
|
||
|
snippet lint "Start a lint-disable comment"
|
||
|
# pylint:disable=${0:lint code}
|
||
|
endsnippet
|
||
10 years ago
|
|
||
|
snippet from "Import a module from another"
|
||
|
from ${1:source} import ${2:module}
|
||
|
endsnippet
|
||
10 years ago
|
|
||
|
snippet def "Function"
|
||
|
def ${1:function name}(${2:parameters}):
|
||
|
"""${3:Function description}"""
|
||
|
$0
|
||
|
endsnippet
|
||
10 years ago
|
|
||
8 years ago
|
snippet init "Class init"
|
||
|
def __init__(self, ${0:params}):
|
||
|
return
|
||
10 years ago
|
endsnippet
|
||
|
|
||
8 years ago
|
snippet nocover "Remove the block from the coverage"
|
||
|
# pragma: no cover
|
||
10 years ago
|
endsnippet
|
||
|
|
||
8 years ago
|
snippet ain "assertIn"
|
||
10 years ago
|
self.assertIn(${1:needle}, ${2:haystack})
|
||
|
endsnippet
|