summaryrefslogtreecommitdiff
path: root/paste/url.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:26:47 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-21 15:26:47 +0200
commit04ecd5542849191457ccfc3e42a39452db47825a (patch)
treeb0a470e46326b709d090a900847bbb004d355607 /paste/url.py
parent4c177fce89fee925f0f4fbfde00ce2e1252562c0 (diff)
downloadpaste-04ecd5542849191457ccfc3e42a39452db47825a.tar.gz
Strip trailing spaces
Diffstat (limited to 'paste/url.py')
-rw-r--r--paste/url.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/paste/url.py b/paste/url.py
index 87a6e8a..74d0d4d 100644
--- a/paste/url.py
+++ b/paste/url.py
@@ -136,7 +136,7 @@ class URLResource(object):
vars = variabledecode.variable_encode(vars)
return vars
-
+
def var(self, **kw):
kw = self.coerce_vars(kw)
new_vars = self.vars + kw.items()
@@ -181,14 +181,14 @@ class URLResource(object):
attrs=u.attrs,
params=u.original_params)
return u
-
+
__div__ = addpath
def become(self, OtherClass):
return OtherClass(self.url, vars=self.vars,
attrs=self.attrs,
params=self.original_params)
-
+
def href__get(self):
s = self.url
if self.vars:
@@ -217,7 +217,7 @@ class URLResource(object):
', '.join(['%s=%r' % (n, v)
for n, v in self.attrs.items()]))
return base + '>'
-
+
def html__get(self):
if not self.params.get('tag'):
raise ValueError(
@@ -250,7 +250,7 @@ class URLResource(object):
for an empty tag (like ``<img />``)
"""
raise NotImplementedError
-
+
def _add_vars(self, vars):
raise NotImplementedError
@@ -328,7 +328,7 @@ class URL(URLResource):
return self.become(JSPopup)
js_popup = property(js_popup__get)
-
+
class Image(URLResource):
r"""
@@ -341,7 +341,7 @@ class Image(URLResource):
>>> i.href
'/images/foo.png'
"""
-
+
default_params = {'tag': 'img'}
def __str__(self):
@@ -470,4 +470,4 @@ class JSPopup(URLResource):
if __name__ == '__main__':
import doctest
doctest.testmod()
-
+