Skip to content

Commit

Permalink
Typos and limit lines to 79 chars.
Browse files Browse the repository at this point in the history
  • Loading branch information
florentx authored and mitsuhiko committed Jun 21, 2010
1 parent d03a552 commit 41b686a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion fungiform/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def empty_as_item(self, value):
count = IntegerField(required=True, sentinel=True)
))
If an the count is ommited the item will not be validated and
If the count is omitted the item will not be validated and
added to the list. As soon as a value is inserted to the
count field, validation happens.
"""
Expand Down
3 changes: 2 additions & 1 deletion fungiform/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def test_escape(self):
s1 = ('This string contains "<tags>" & "double-quotes", '
'and single quotes "\'".')
q1 = utils.Markup('This string contains &#34;&lt;tags&gt;&#34; &amp; '
'&#34;double-quotes&#34;, and single quotes &#34;\'&#34;.')
'&#34;double-quotes&#34;, and single quotes '
'&#34;\'&#34;.')
self.assertEqual(utils.escape(None), '')
self.assertEqual(utils.escape(s1), q1)

Expand Down
11 changes: 6 additions & 5 deletions fungiform/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ class Markup(unicode):
>>> class Foo(object):
... def __html__(self):
... return '<a href="#">foo</a>'
...
...
>>> Markup(Foo())
u'<a href="#">foo</a>'
Expand Down Expand Up @@ -371,6 +371,7 @@ def splitlines(self, *args, **kwargs):

def make_wrapper(name):
orig = getattr(unicode, name)

def func(self, *args, **kwargs):
args = _escape_argspec(list(args), enumerate(args))
_escape_argspec(kwargs, kwargs.iteritems())
Expand Down Expand Up @@ -496,11 +497,11 @@ def proxy(*children, **arguments):
children_as_string = u''.join(unicode(x) for x in children
if x is not None)
if self._dialect == 'xhtml':
children_as_string = '/*<![CDATA[*/%s/*]]>*/' % \
children_as_string
children_as_string = \
'/*<![CDATA[*/%s/*]]>*/' % children_as_string
else:
children_as_string = Markup(u''.join(escape(x) for x in children
if x is not None))
children_as_string = Markup(u''.join(
escape(x) for x in children if x is not None))
buffer.extend((children_as_string, '</%s>' % tag))
return Markup(u''.join(buffer))
return proxy
Expand Down

0 comments on commit 41b686a

Please sign in to comment.