summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurits van Rees <maurits@vanrees.org>2014-01-13 15:48:38 +0100
committerMaurits van Rees <maurits@vanrees.org>2014-01-13 15:48:38 +0100
commit5efa988a516569468673d9ac4697af65bb28266b (patch)
tree0e25c4cc1b3e8c942644cf9f37ad8a3b080db0a5
parent43455ed1d81dd8ec6733cc2fb106702b7960e310 (diff)
downloadzope-tal-5efa988a516569468673d9ac4697af65bb28266b.tar.gz
Minor pep8 for long lines.
-rw-r--r--src/zope/tal/talgettext.py9
-rw-r--r--src/zope/tal/tests/test_talgettext.py12
2 files changed, 14 insertions, 7 deletions
diff --git a/src/zope/tal/talgettext.py b/src/zope/tal/talgettext.py
index 91c72e8..7979f1e 100644
--- a/src/zope/tal/talgettext.py
+++ b/src/zope/tal/talgettext.py
@@ -133,13 +133,16 @@ class POEngine(DummyEngine):
idx = msgids.index(msgid)
existing_msgid = msgids[idx]
if msgid.default != existing_msgid.default:
- references = '\n'.join([location[0]+':'+str(location[1]) for location in domain[msgid]])
- # Note: a lot of encode calls here are needed so Python 3 does not break.
+ references = '\n'.join([location[0]+':'+str(location[1])
+ for location in domain[msgid]])
+ # Note: a lot of encode calls here are needed so
+ # Python 3 does not break.
print(("Warning: msgid '%s' in %s already exists "
"with a different default (bad: %s, should be: %s)\n"
"The references for the existent value are:\n%s\n" %
(msgid.encode('utf-8'),
- self.file.encode('utf-8') + ':'.encode('utf-8') + str(position).encode('utf-8'),
+ self.file.encode('utf-8') + ':'.encode('utf-8')
+ + str(position).encode('utf-8'),
msgid.default.encode('utf-8'),
existing_msgid.default.encode('utf-8'),
references.encode('utf-8'))),
diff --git a/src/zope/tal/tests/test_talgettext.py b/src/zope/tal/tests/test_talgettext.py
index 3799297..d024213 100644
--- a/src/zope/tal/tests/test_talgettext.py
+++ b/src/zope/tal/tests/test_talgettext.py
@@ -69,11 +69,15 @@ class test_POEngine(unittest.TestCase):
# UnicodeDecodeError, which is what we test here.
engine.file = 'psc_release_listing.pt'
# position is position in file.
- engine.translate('foo', 'domain', default=u'Read more\u2026', position=7)
+ engine.translate('foo', 'domain',
+ default=u'Read more\u2026', position=7)
# Adding the same key with the same default is fine.
- engine.translate('foo', 'domain', default=u'Read more\u2026', position=13)
- # Adding the same key with a different default is bad and triggers a warning.
- engine.translate('foo', 'domain', default='Read still more&hellip;', position=42)
+ engine.translate('foo', 'domain',
+ default=u'Read more\u2026', position=13)
+ # Adding the same key with a different default is bad and
+ # triggers a warning.
+ engine.translate('foo', 'domain',
+ default='Read still more&hellip;', position=42)
def test_dynamic_msgids(self):
sample_source = """