Rev 6611: Fix pep8 in po_merge plugin. in file:///home/vila/src/bzr/experimental/py3/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Wed Sep 2 09:20:55 UTC 2015
At file:///home/vila/src/bzr/experimental/py3/
------------------------------------------------------------
revno: 6611
revision-id: v.ladeuil+lp at free.fr-20150902092055-5mvpnh1nwt5b8ymp
parent: v.ladeuil+lp at free.fr-20150902091632-td1jtbiad73895pp
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: pep8
timestamp: Wed 2015-09-02 11:20:55 +0200
message:
Fix pep8 in po_merge plugin.
-------------- next part --------------
=== modified file 'bzrlib/plugins/po_merge/__init__.py'
--- a/bzrlib/plugins/po_merge/__init__.py 2011-12-20 22:09:13 +0000
+++ b/bzrlib/plugins/po_merge/__init__.py 2015-09-02 09:20:55 +0000
@@ -53,13 +53,13 @@
"""
-from bzrlib import (
- config,
- # Since we are a built-in plugin we share the bzrlib version
- version_info,
- )
+import bzrlib
+from bzrlib import config
from bzrlib.hooks import install_lazy_named_hook
+# Since we are a built-in plugin we share the bzrlib version
+version_info = bzrlib.version_info
+
def register_lazy_option(key, member):
config.option_registry.register_lazy(
@@ -79,7 +79,7 @@
install_lazy_named_hook("bzrlib.merge", "Merger.hooks", "merge_file_content",
- po_merge_hook, ".po file merge")
+ po_merge_hook, ".po file merge")
def load_tests(basic_tests, module, loader):
@@ -87,6 +87,5 @@
'tests',
]
basic_tests.addTest(loader.loadTestsFromModuleNames(
- ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
+ ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
return basic_tests
-
=== modified file 'bzrlib/plugins/po_merge/po_merge.py'
--- a/bzrlib/plugins/po_merge/po_merge.py 2011-12-21 10:42:34 +0000
+++ b/bzrlib/plugins/po_merge/po_merge.py 2015-09-02 09:20:55 +0000
@@ -40,9 +40,9 @@
command_option = config.Option(
- 'po_merge.command',
- default='msgmerge -N "{other}" "{pot_file}" -C "{this}" -o "{result}"',
- help='''\
+ 'po_merge.command',
+ default='msgmerge -N "{other}" "{pot_file}" -C "{this}" -o "{result}"',
+ help='''\
Command used to create a conflict-free .po file during merge.
The following parameters are provided by the hook:
@@ -58,17 +58,17 @@
po_dirs_option = config.ListOption(
- 'po_merge.po_dirs', default='po,debian/po',
- help='List of dirs containing .po files that the hook applies to.')
+ 'po_merge.po_dirs', default='po,debian/po',
+ help='List of dirs containing .po files that the hook applies to.')
po_glob_option = config.Option(
- 'po_merge.po_glob', default='*.po',
- help='Glob matching all ``.po`` files in one of ``po_merge.po_dirs``.')
+ 'po_merge.po_glob', default='*.po',
+ help='Glob matching all ``.po`` files in one of ``po_merge.po_dirs``.')
pot_glob_option = config.Option(
- 'po_merge.pot_glob', default='*.pot',
- help='Glob matching the ``.pot`` file in one of ``po_merge.po_dirs``.')
+ 'po_merge.pot_glob', default='*.pot',
+ help='Glob matching the ``.pot`` file in one of ``po_merge.po_dirs``.')
class PoMerger(merge.PerFileMerger):
@@ -82,9 +82,9 @@
# FIXME: We use the branch config as there is no tree config
# -- vila 2011-11-23
self.conf = merger.this_branch.get_config_stack()
- # Which dirs are targeted by the hook
+ # Which dirs are targeted by the hook
self.po_dirs = self.conf.get('po_merge.po_dirs')
- # Which files are targeted by the hook
+ # Which files are targeted by the hook
self.po_glob = self.conf.get('po_merge.po_glob')
# Which .pot file should be used
self.pot_glob = self.conf.get('po_merge.pot_glob')
=== modified file 'bzrlib/plugins/po_merge/tests/__init__.py'
--- a/bzrlib/plugins/po_merge/tests/__init__.py 2011-11-28 16:31:24 +0000
+++ b/bzrlib/plugins/po_merge/tests/__init__.py 2015-09-02 09:20:55 +0000
@@ -14,10 +14,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
def load_tests(basic_tests, module, loader):
testmod_names = [
'test_po_merge',
]
basic_tests.addTest(loader.loadTestsFromModuleNames(
- ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
+ ["%s.%s" % (__name__, tmn) for tmn in testmod_names]))
return basic_tests
=== modified file 'bzrlib/plugins/po_merge/tests/test_po_merge.py'
--- a/bzrlib/plugins/po_merge/tests/test_po_merge.py 2011-12-08 08:32:36 +0000
+++ b/bzrlib/plugins/po_merge/tests/test_po_merge.py 2015-09-02 09:20:55 +0000
@@ -15,12 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-import os
-
-from bzrlib import (
- merge,
- tests,
- )
+from bzrlib import merge
from bzrlib.tests import (
features,
script,
@@ -28,6 +23,7 @@
from bzrlib.plugins import po_merge
+
class BlackboxTestPoMerger(script.TestCaseWithTransportAndScript):
_test_needs_features = [features.msgmerge_feature]
@@ -100,7 +96,7 @@
_Adduser['base_pot'])),
('add', ('po/fr.po', 'po-id', 'file',
_Adduser['base_po'])),
- ])
+ ])
# The 'other' branch
builder.build_snapshot('other', ['base'],
[('modify', ('pot-id',
@@ -133,7 +129,7 @@
self.assertFileEqual(_Adduser['%(revid)s_pot' % env],
'%(branch_name)s/po/adduser.pot' % env)
self.assertFileEqual(_Adduser['%(revid)s_po' % env],
- '%(branch_name)s/po/fr.po' % env )
+ '%(branch_name)s/po/fr.po' % env)
def test_base(self):
self.assertAdduserBranchContent('base')
@@ -150,7 +146,7 @@
# beginning of the file.
_Adduser = dict(
- base_pot = r"""# SOME DESCRIPTIVE TITLE.
+ base_pot=r"""# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
@@ -178,7 +174,7 @@
msgstr ""
""",
- this_pot = r"""# SOME DESCRIPTIVE TITLE.
+ this_pot=r"""# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
@@ -213,7 +209,7 @@
msgstr ""
""",
- other_pot = r"""# SOME DESCRIPTIVE TITLE.
+ other_pot=r"""# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
@@ -248,7 +244,7 @@
msgstr ""
""",
- resolved_pot = r"""# SOME DESCRIPTIVE TITLE.
+ resolved_pot=r"""# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
@@ -283,7 +279,7 @@
msgstr ""
""",
- base_po = r"""# adduser's manpages translation to French
+ base_po=r"""# adduser's manpages translation to French
# Copyright (C) 2004 Software in the Public Interest
# This file is distributed under the same license as the adduser package
#
@@ -319,7 +315,7 @@
"Attention?! Le r?pertoire personnel que vous avez indiqu? existe d?j?.\n"
""",
- this_po = r"""# adduser's manpages translation to French
+ this_po=r"""# adduser's manpages translation to French
# Copyright (C) 2004 Software in the Public Interest
# This file is distributed under the same license as the adduser package
#
@@ -362,7 +358,7 @@
"Attention?! Le r?pertoire personnel que vous avez indiqu? existe d?j?.\n"
""",
- other_po = r"""# adduser's manpages translation to French
+ other_po=r"""# adduser's manpages translation to French
# Copyright (C) 2004 Software in the Public Interest
# This file is distributed under the same license as the adduser package
#
@@ -405,7 +401,7 @@
"indiqu? (%s)?: %s.\n"
""",
- resolved_po = r"""# adduser's manpages translation to French
+ resolved_po=r"""# adduser's manpages translation to French
# Copyright (C) 2004 Software in the Public Interest
# This file is distributed under the same license as the adduser package
#
More information about the bazaar-commits
mailing list