From 9a63deb18a0886ae9547feb1f820404698e29558 Mon Sep 17 00:00:00 2001 From: Jakub Stasiak Date: Sat, 3 Nov 2012 12:03:52 +0100 Subject: [PATCH] Use "# TODO: write code..." as code placeholder in Python snippets (#34) --- snippets/python.snippets | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/snippets/python.snippets b/snippets/python.snippets index b3b1e9b..7f58d98 100644 --- a/snippets/python.snippets +++ b/snippets/python.snippets @@ -13,16 +13,16 @@ snippet docs ''' snippet wh while ${1:condition}: - ${2:# code...} + ${2:# TODO: write code...} # dowh - does the same as do...while in other languages snippet dowh while True: - ${1:# code...} + ${1:# TODO: write code...} if ${2:condition}: break snippet with with ${1:expr} as ${2:var}: - ${3:# code...} + ${3:# TODO: write code...} # New Class snippet cl class ${1:ClassName}(${2:object}): @@ -35,14 +35,14 @@ snippet cl snippet def def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): """${3:docstring for $1}""" - ${4:pass} + ${4:# TODO: write code...} snippet deff def ${1:fname}(${2:`indent('.') ? 'self' : ''`}): - ${3} + ${3:# TODO: write code...} # New Method snippet defs def ${1:mname}(self, ${2:arg}): - ${3:pass} + ${3:# TODO: write code...} # New Property snippet property def ${1:foo}(): @@ -54,17 +54,17 @@ snippet property # Ifs snippet if if ${1:condition}: - ${2:code...} + ${2:# TODO: write code...} snippet el else: - ${1:code...} + ${1:# TODO: write code...} snippet ei elif ${1:condition}: - ${2:code...} + ${2:# TODO: write code...} # For snippet for for ${1:item} in ${2:items}: - ${3:code...} + ${3:# TODO: write code...} # Encodes snippet cutf8 # -*- coding: utf-8 -*- @@ -79,32 +79,32 @@ snippet . self. snippet try Try/Except try: - ${1:pass} + ${1:# TODO: write code...} except ${2:Exception}, ${3:e}: ${4:raise $3} snippet try Try/Except/Else try: - ${1:pass} + ${1:# TODO: write code...} except ${2:Exception}, ${3:e}: ${4:raise $3} else: - ${5:pass} + ${5:# TODO: write code...} snippet try Try/Except/Finally try: - ${1:pass} + ${1:# TODO: write code...} except ${2:Exception}, ${3:e}: ${4:raise $3} finally: - ${5:pass} + ${5:# TODO: write code...} snippet try Try/Except/Else/Finally try: - ${1:pass} + ${1:# TODO: write code...} except ${2:Exception}, ${3:e}: ${4:raise $3} else: - ${5:pass} + ${5:# TODO: write code...} finally: - ${6:pass} + ${6:# TODO: write code...} # if __name__ == '__main__': snippet ifmain if __name__ == '__main__': @@ -130,12 +130,12 @@ snippet " # test function/method snippet test def test_${1:description}(${2:`indent('.') ? 'self' : ''`}): - ${3:pass} + ${3:# TODO: write code...} # test case snippet testcase class ${1:ExampleCase}(unittest.TestCase): def test_${2:description}(self): - ${3:pass} + ${3:# TODO: write code...} snippet fut from __future__ import ${1}