Skip to content

Fix spelling throughout UltiSnips/python.snippets #323

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 23, 2014
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
26 changes: 13 additions & 13 deletions UltiSnips/python.snippets
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def get_quoting_style(snip):
return SINGLE_QUOTES
return DOUBLE_QUOTES

def tripple_quotes(snip):
def triple_quotes(snip):
if get_quoting_style(snip) == SINGLE_QUOTES:
return "'''"
return '"""'
Expand Down Expand Up @@ -104,7 +104,7 @@ def format_return(style):

def write_docstring_args(args, snip):
if not args:
snip.rv += ' {0}'.format(tripple_quotes(snip))
snip.rv += ' {0}'.format(triple_quotes(snip))
return

snip.rv += '\n' + snip.mkline('', indent='')
Expand Down Expand Up @@ -166,10 +166,10 @@ endglobal
snippet class "class with docstrings" b
class ${1:MyClass}(${2:object}):

`!p snip.rv = tripple_quotes(snip)`${3:Docstring for $1. }`!p snip.rv = tripple_quotes(snip)`
`!p snip.rv = triple_quotes(snip)`${3:Docstring for $1. }`!p snip.rv = triple_quotes(snip)`

def __init__(self$4):
`!p snip.rv = tripple_quotes(snip)`${5:@todo: to be defined1.}`!p
`!p snip.rv = triple_quotes(snip)`${5:@todo: to be defined1.}`!p
snip.rv = ""
snip >> 2

Expand All @@ -178,7 +178,7 @@ args = get_args(t[4])
write_docstring_args(args, snip)
if args:
snip.rv += '\n' + snip.mkline('', indent='')
snip += '{0}'.format(tripple_quotes(snip))
snip += '{0}'.format(triple_quotes(snip))

write_init_body(args, t[2], snip)
`
Expand All @@ -189,15 +189,15 @@ endsnippet
snippet slotclass "class with slots and docstrings" b
class ${1:MyClass}(${2:object}):

`!p snip.rv = tripple_quotes(snip)`${3:Docstring for $1. }`!p snip.rv = tripple_quotes(snip)`
`!p snip.rv = triple_quotes(snip)`${3:Docstring for $1. }`!p snip.rv = triple_quotes(snip)`
`!p
snip >> 1
args = get_args(t[4])
write_slots_args(args, snip)
`

def __init__(self$4):
`!p snip.rv = tripple_quotes(snip)`${5:@todo: to be defined.}`!p
`!p snip.rv = triple_quotes(snip)`${5:@todo: to be defined.}`!p
snip.rv = ""
snip >> 2

Expand All @@ -206,7 +206,7 @@ args = get_args(t[4])
write_docstring_args(args, snip)
if args:
snip.rv += '\n' + snip.mkline('', indent='')
snip += tripple_quotes(snip)
snip += triple_quotes(snip)

write_init_body(args, t[2], snip)
`
Expand Down Expand Up @@ -399,7 +399,7 @@ snippet def "function with docstrings" b
def ${1:function}(`!p
if snip.indent:
snip.rv = 'self' + (", " if len(t[2]) else "")`${2:arg1}):
`!p snip.rv = tripple_quotes(snip)`${4:@todo: Docstring for $1.}`!p
`!p snip.rv = triple_quotes(snip)`${4:@todo: Docstring for $1.}`!p
snip.rv = ""
snip >> 1

Expand All @@ -410,7 +410,7 @@ if args:
style = get_style(snip)
snip += format_return(style)
snip.rv += '\n' + snip.mkline('', indent='')
snip += tripple_quotes(snip) `
snip += triple_quotes(snip) `
${0:pass}
endsnippet

Expand All @@ -436,7 +436,7 @@ endsnippet

snippet rwprop "Read write property" b
def ${1:name}():
`!p snip.rv = tripple_quotes(snip) if t[2] else ''
`!p snip.rv = triple_quotes(snip) if t[2] else ''
`${2:@todo: Docstring for $1.}`!p
if t[2]:
snip >> 1
Expand All @@ -445,7 +445,7 @@ if t[2]:
snip.rv += '\n' + snip.mkline('', indent='')
snip += format_return(style)
snip.rv += '\n' + snip.mkline('', indent='')
snip += tripple_quotes(snip)
snip += triple_quotes(snip)
else:
snip.rv = ""`
def fget(self):
Expand Down Expand Up @@ -564,7 +564,7 @@ endsnippet
snippet testcase "pyunit testcase" b
class Test${1:Class}(${2:unittest.TestCase}):

`!p snip.rv = tripple_quotes(snip)`${3:Test case docstring.}`!p snip.rv = tripple_quotes(snip)`
`!p snip.rv = triple_quotes(snip)`${3:Test case docstring.}`!p snip.rv = triple_quotes(snip)`

def setUp(self):
${4:pass}
Expand Down