Skip to content

Commit

Permalink
Nuke trailing white space
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Jan 3, 2012
1 parent 007e444 commit f47bcfa
Show file tree
Hide file tree
Showing 25 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion benchmark/benchmark/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def enableZ3CPT():
base = zope.component.globalregistry.base
base.registerUtility(z3c.ptcompat.engine.Program, IPageTemplateEngine,
name=u'', event=False)

def disableZ3CPT():
"""Disable z3c.pt engine"""
base = zope.component.globalregistry.base
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/button_display.pt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
<input id="" name="" class="" value="" disabled="disabled" type="button"
<input id="" name="" class="" value="" disabled="disabled" type="button"
tal:attributes="id view/id;
name view/name;
class view/klass;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/checkbox.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@
layer="z3c.form.interfaces.IFormLayer"
template="checkbox_hidden.pt"
/>

</configure>
6 changes: 3 additions & 3 deletions src/z3c/form/browser/checkbox_hidden.pt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
<span class="option"
tal:repeat="item view/items">
tal:repeat="item view/items">
<input id="" name="" value="" class="hidden-widget" title=""
tabindex="" accesskey=""
type="hidden"
Expand Down Expand Up @@ -31,6 +31,6 @@
readonly view/readonly;
alt view/alt;
accesskey view/accesskey;
onselect view/onselect" />
</span>
onselect view/onselect" />
</span>
</html>
4 changes: 2 additions & 2 deletions src/z3c/form/browser/checkbox_input.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
tal:omit-tag="">
<span class="option"
tal:repeat="item view/items">
<input type="checkbox" id="" name="" class="" alt="" title=""
Expand Down Expand Up @@ -35,7 +35,7 @@
onselect view/onselect"
/><input id="" name="" class="" alt="" title="" tabindex=""
disabled="" readonly="" accesskey="" value=""
type="checkbox"
type="checkbox"
tal:condition="not:item/checked"
tal:attributes="id item/id;
name item/name;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/image_display.pt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
<input id="" name="" class="" src="" value="" disabled="disabled" type="image"
<input id="" name="" class="" src="" value="" disabled="disabled" type="image"
tal:attributes="id view/id;
name view/name;
class view/klass;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/image_input.pt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
<input id="" name="" class="" src="" value=""
accesskey="" type="image"
accesskey="" type="image"
tal:attributes="id view/id;
name view/name;
class view/klass;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/object.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
layer="z3c.form.interfaces.IFormLayer"
template="object_input.pt"
/>

</configure>
4 changes: 2 additions & 2 deletions src/z3c/form/browser/orderedselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ def deselect(self):
selecteditems = []
notselecteditems = []
for selecteditem in self.selectedItems:
selecteditems.append(selecteditem['content'])
selecteditems.append(selecteditem['content'])
for item in self.items:
if not item['content'] in selecteditems:
notselecteditems.append(item)
return notselecteditems


@zope.component.adapter(zope.schema.interfaces.ISequence, interfaces.IFormLayer)
@zope.interface.implementer(interfaces.IFieldWidget)
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/orderedselect_input.pt
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ function selectionError()
>&larr;</button>
</td>
<td>
<select id="to" name="to" class="" multiple="" size="5"
<select id="to" name="to" class="" multiple="" size="5"
tal:attributes="id string:${view/id}-to;
name string:${view/name}.to;
class view/klass;
Expand Down
4 changes: 2 additions & 2 deletions src/z3c/form/browser/password_input.pt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
tal:omit-tag="">
<input id="" name="" class="" title="" lang="" disabled=""
readonly="" alt="" tabindex="" accesskey="" size="" maxlength=""
type="password"
type="password"
tal:attributes="id view/id;
name view/name;
class view/klass;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/select_hidden.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
tal:omit-tag="">
<tal:block define="id view/id;
name string:${view/name}:list"
repeat="item view/items">
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/select_input.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
tal:omit-tag="">
<select id="" name="" class="" tabindex="" disabled="" multiple="" size=""
tal:attributes="id view/id;
name string:${view/name}:list;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/submit_display.pt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
<input id="" name="" class="" value="" disabled="disabled" type="submit"
<input id="" name="" class="" value="" disabled="disabled" type="submit"
tal:attributes="id view/id;
name view/name;
class view/klass;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/submit_input.pt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
<input id="" name="" class="" value=""
accesskey="" type="submit"
accesskey="" type="submit"
tal:attributes="id view/id;
name view/name;
class view/klass;
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_suite():
checker = outputchecker.OutputChecker(doctest)

# This package will setup z3c.pt support for testing by default.
# The Z3CPT_AVAILABLE option allows to run z3c.form test from a
# The Z3CPT_AVAILABLE option allows to run z3c.form test from a
# custom setup which doesn't use z3c.pt. But do we really need this?
# I guess not or is there a reason to support this?
if Z3CPT_AVAILABLE:
Expand Down
4 changes: 2 additions & 2 deletions src/z3c/form/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ class IFormLayer(zope.interface.Interface):
It is intended that someone can just use this layer as a base layer when
using this package.
Since version 2.4.2, this layer doesn't provide IBrowserRequst anymore.
This makes it possible to use the IFormLayer within z3c.jsonrpc without
to apply the IBrowserRequest into the jsonrpc request.
to apply the IBrowserRequest into the jsonrpc request.
"""


Expand Down
4 changes: 2 additions & 2 deletions src/z3c/form/term.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def ChoiceTerms(context, request, form, field, widget):


class ChoiceTermsVocabulary(Terms):
"""ITerms adapter for zope.schema.IChoice based implementations using
"""ITerms adapter for zope.schema.IChoice based implementations using
vocabulary."""

zope.component.adapts(
Expand Down Expand Up @@ -177,7 +177,7 @@ def CollectionTerms(context, request, form, field, widget):
interfaces.ITerms)

class CollectionTermsVocabulary(Terms):
"""ITerms adapter for zope.schema.ICollection based implementations using
"""ITerms adapter for zope.schema.ICollection based implementations using
vocabulary."""

zope.component.adapts(
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/tests/simple_caredit.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal">
xmlns:tal="http://xml.zope.org/namespaces/tal">
<body>
<i tal:condition="view/status" tal:content="view/status" />
<ul tal:condition="view/widgets/errors">
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/tests/simple_display.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal">
xmlns:tal="http://xml.zope.org/namespaces/tal">
<body>
<div class="row" tal:repeat="widget view/widgets/values">
<span tal:replace="structure widget/render" /></div>
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/tests/simple_edit.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal">
xmlns:tal="http://xml.zope.org/namespaces/tal">
<body>
<i tal:condition="view/status" tal:content="view/status" />
<ul tal:condition="view/widgets/errors">
Expand Down
4 changes: 2 additions & 2 deletions src/z3c/form/tests/simple_edit_with_providers.pt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<div class="row" tal:define="is_widget snippet/id | nothing">

<tal:widget condition="is_widget"
<tal:widget condition="is_widget"
define="widget snippet">
<b tal:condition="widget/error"
tal:content="structure widget/error/render"
Expand All @@ -30,7 +30,7 @@
<tal:provider condition="not:is_widget"
define="contentprovider snippet"
replace="structure contentprovider/render" />

</div>

</tal:snippets>
Expand Down
4 changes: 2 additions & 2 deletions src/z3c/form/tests/simple_groupedit.pt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:tal="http://xml.zope.org/namespaces/tal">
xmlns:tal="http://xml.zope.org/namespaces/tal">
<body>
<i tal:condition="view/status" tal:content="view/status"/>
<ul tal:condition="view/widgets/errors"
Expand All @@ -23,7 +23,7 @@
inserted between tags (I tried to add "a" right after the
last tag - <input type="text" tal:replace="blahblah" />
Good luck to z3c.pt debuggers. :-)

nadako
</tal:XXX>
<metal:block metal:define-macro="rows">
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/tests/simple_owneredit.pt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:tal="http://xml.zope.org/namespaces/tal"
tal:omit-tag="">
tal:omit-tag="">
<i tal:condition="view/status" tal:content="view/status" />
<ul tal:condition="view/widgets/errors">
<li tal:repeat="error view/widgets/errors">
Expand Down
6 changes: 3 additions & 3 deletions src/z3c/form/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,16 @@ def getSpecification(spec, force=False):
(spec is not None and
not zope.interface.interfaces.ISpecification.providedBy(spec)
and not isinstance(spec, classTypes)) ):

# Step 1: Calculate an interface name
ifaceName = 'IGeneratedForObject_%i' %hash(spec)

# Step 2: Find out if we already have such an interface
existingInterfaces = [
i for i in zope.interface.directlyProvidedBy(spec)
if i.__name__ == ifaceName
]

# Step 3a: Return an existing interface if there is one
if len(existingInterfaces) > 0:
spec = existingInterfaces[0]
Expand Down

0 comments on commit f47bcfa

Please sign in to comment.