summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Gedminas <marius@gedmin.as>2004-06-10 09:55:46 +0000
committerMarius Gedminas <marius@gedmin.as>2004-06-10 09:55:46 +0000
commite83b3286e7863963e82a15dab556dec8a2682c17 (patch)
treeba9f576d89eee5ea95df0b3f25ed79a916ef212e
parent2474b7cf3bdf05977c1443cde11c4a0a0dfd42f3 (diff)
downloadzope-tal-e83b3286e7863963e82a15dab556dec8a2682c17.tar.gz
Cleaned up trailing whitespace, fixed a typo, and wrapped a 97-character wide
docstring.
-rw-r--r--dummyengine.py2
-rw-r--r--interfaces.py6
-rw-r--r--taldefs.py2
-rw-r--r--talgenerator.py6
-rw-r--r--talgettext.py2
-rw-r--r--talinterpreter.py10
6 files changed, 15 insertions, 13 deletions
diff --git a/dummyengine.py b/dummyengine.py
index f8b953f..ba09ef5 100644
--- a/dummyengine.py
+++ b/dummyengine.py
@@ -215,7 +215,7 @@ class DummyEngine:
if self.useEngineAttrDicts:
globals = self.globals.copy()
locals = self.locals.copy()
-
+
assert lang == 'text/server-python'
import sys, StringIO
diff --git a/interfaces.py b/interfaces.py
index 2b0d965..60f5e96 100644
--- a/interfaces.py
+++ b/interfaces.py
@@ -11,7 +11,9 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""Interface that a TAL expression implementation provides to the METAL/TAL implementation."""
+"""Interface that a TAL expression implementation provides to the METAL/TAL
+implementation.
+"""
from zope.interface import Attribute, Interface
@@ -165,7 +167,7 @@ class ITALExpressionEngine(Interface):
per-language basis. In Python this usually everything the print
statement will return.
"""
-
+
class ITALIterator(Interface):
"""A TAL iterator
diff --git a/taldefs.py b/taldefs.py
index aeee83a..988e275 100644
--- a/taldefs.py
+++ b/taldefs.py
@@ -12,7 +12,7 @@
#
##############################################################################
"""
-Common definitions used by TAL and METAL compilation an transformation.
+Common definitions used by TAL and METAL compilation and transformation.
"""
import re
diff --git a/talgenerator.py b/talgenerator.py
index 7959a8f..36ee4d1 100644
--- a/talgenerator.py
+++ b/talgenerator.py
@@ -694,7 +694,7 @@ class TALGenerator:
todo["repldict"] = repldict
repldict = {}
if script:
- todo["script"] = script
+ todo["script"] = script
self.emitStartTag(name, self.replaceAttrs(attrlist, repldict), isend)
if optTag:
self.pushProgram()
@@ -705,7 +705,7 @@ class TALGenerator:
if content and varname:
self.pushProgram()
if script:
- self.pushProgram()
+ self.pushProgram()
if todo and position != (None, None):
todo["position"] = position
self.todoPush(todo)
@@ -797,7 +797,7 @@ class TALGenerator:
self.emitI18nVariable(varname)
# Do not test for "msgid is not None", i.e. we only want to test for
# explicit msgids here. See comment above.
- if msgid is not None:
+ if msgid is not None:
# in case tal:content, i18n:translate and i18n:name in the
# same tag insertTranslation opcode has already been
# emitted
diff --git a/talgettext.py b/talgettext.py
index bf30a97..bc56187 100644
--- a/talgettext.py
+++ b/talgettext.py
@@ -113,7 +113,7 @@ class POEngine(DummyEngine):
# text into a comment.
if default is not None and normalize(default) != msgid:
msgid = MessageID(msgid, default=default)
-
+
if domain not in self.catalog:
self.catalog[domain] = {}
domain = self.catalog[domain]
diff --git a/talinterpreter.py b/talinterpreter.py
index c3c9323..cc21334 100644
--- a/talinterpreter.py
+++ b/talinterpreter.py
@@ -335,7 +335,7 @@ class TALInterpreter:
if evalue is None:
ok = 0
value = evalue
-
+
if ok:
if xlat:
translated = self.translate(msgid or value, value, {})
@@ -488,7 +488,7 @@ class TALInterpreter:
# i18n interpolation dictionary.
value = self.engine.evaluate(expression)
- # evaluate() does not do any I18n, so we do it here.
+ # evaluate() does not do any I18n, so we do it here.
if isinstance(value, MessageID):
# Translate this now.
value = self.engine.translate(value)
@@ -599,7 +599,7 @@ class TALInterpreter:
self.popStream()
code = tmpstream.getvalue()
output = self.engine.evaluateCode(lang, code)
- self._stream_write(output)
+ self._stream_write(output)
bytecode_handlers["evaluateCode"] = do_evaluateCode
def do_loop(self, (name, expr, block)):
@@ -665,8 +665,8 @@ class TALInterpreter:
raise METALError("macro %s has incompatible mode %s" %
(`macroName`, `mode`), self.position)
self.pushMacro(macroName, compiledSlots)
-
- # We want 'macroname' name to be always available as a variable
+
+ # We want 'macroname' name to be always available as a variable
outer = self.engine.getValue('macroname')
self.engine.setLocal('macroname', macroName.split('/')[-1])