From 5efa988a516569468673d9ac4697af65bb28266b Mon Sep 17 00:00:00 2001 From: Maurits van Rees Date: Mon, 13 Jan 2014 15:48:38 +0100 Subject: Minor pep8 for long lines. --- src/zope/tal/talgettext.py | 9 ++++++--- src/zope/tal/tests/test_talgettext.py | 12 ++++++++---- 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…', 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…', position=42) def test_dynamic_msgids(self): sample_source = """ -- cgit v1.2.1