From 91ecf6aec47f1041e22da3673e606eacdaaa80f1 Mon Sep 17 00:00:00 2001 From: Holger Rapp Date: Wed, 25 Jan 2012 08:14:54 +0100 Subject: [PATCH] Fix error in def snippet when inside of a class --- UltiSnips/python.snippets | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/UltiSnips/python.snippets b/UltiSnips/python.snippets index 100a82f..f2c7264 100644 --- a/UltiSnips/python.snippets +++ b/UltiSnips/python.snippets @@ -323,7 +323,9 @@ def __coerce__(self, other): endsnippet snippet def "function with docstrings" b -def ${1:function}(`!p if snip.indent: snip.rv = 'self, '`${2:arg1}): +def ${1:function}(`!p +if snip.indent: + snip.rv = 'self' + (", " if len(t[2]) else "")`${2:arg1}): """${4:@todo: Docstring for $1}`!p snip.rv = "" snip >> 1