changeset 2141:e58f8d21b373

fix/avoid some pep8 issues
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 15 Sep 2013 14:02:19 +0200
parents 56ca9d2dcfc9
children 2e205b784aed 337b8bb2c903 96abee43bb39 79dd0e5754a9 e3dfa238d68d cd78c858b1e6
files MoinMoin/config/default.py MoinMoin/converter/_tests/test_docbook_in.py MoinMoin/converter/_tests/test_mediawiki_in.py MoinMoin/items/__init__.py setup.cfg
diffstat 5 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/config/default.py	Tue Aug 20 22:07:23 2013 +0200
+++ b/MoinMoin/config/default.py	Sun Sep 15 14:02:19 2013 +0200
@@ -163,7 +163,7 @@
             except (KeyError, ValueError):
                 raise error.ConfigurationError(
                     "You must set a (at least {0} chars long) secret string for secrets['{1}']!".format(
-                    secret_min_length, secret_key_name))
+                        secret_min_length, secret_key_name))
 
         from passlib.context import CryptContext
         try:
@@ -565,9 +565,9 @@
     )),
 
     'ns': ('Storage Namespaces',
-    "Storage namespaces can be defined for all sorts of data. All items sharing a common namespace as prefix" +
-    "are then stored within the same backend. The common prefix for all data is ''.",
-    (
+           "Storage namespaces can be defined for all sorts of data. "
+           "All items sharing a common namespace as prefix are then stored within the same backend. "
+           "The common prefix for all data is ''.", (
         ('content', '/', "All content is by default stored below /, hence the prefix is ''."),  # Not really necessary. Just for completeness.
         ('user_profile', 'UserProfile/', 'User profiles (i.e. user data, not their homepage) are stored in this namespace.'),
         ('user_homepage', 'User/', 'All user homepages are stored below this namespace.'),
--- a/MoinMoin/converter/_tests/test_docbook_in.py	Tue Aug 20 22:07:23 2013 +0200
+++ b/MoinMoin/converter/_tests/test_docbook_in.py	Sun Sep 15 14:02:19 2013 +0200
@@ -137,7 +137,7 @@
                 '/page/body/div/list[@item-label-generate="ordered"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
             # ORDERED LIST with upperalpha numeration --> ordered list with upper-alpha list-style-type
             ('<article><orderedlist numeration="upperalpha"><listitem>Ordered Item 1</listitem><listitem>Ordered Item 2</listitem></orderedlist></article>',
-            # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="upper-alpha"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
+             # <page><body><div html:class="article"><list item-label-generage="ordered" list-style-type="upper-alpha"><list-item><list-item-body>Ordered Item 1</list-item-body></list-item><list-item><list-item-body>Ordered Item 2</list-item-body></list-item></list></div></body></page>
                 '/page/body/div/list[@item-label-generate="ordered"][@list-style-type="upper-alpha"][list-item[1]/list-item-body[text()="Ordered Item 1"]][list-item[2]/list-item-body[text()="Ordered Item 2"]]'),
             # ORDERED LIST with loweralpha numeration --> ordered list with lower-alpha list-style-type
             ('<article><orderedlist numeration="loweralpha"><listitem>Ordered Item 1</listitem><listitem>Ordered Item 2</listitem></orderedlist></article>',
--- a/MoinMoin/converter/_tests/test_mediawiki_in.py	Tue Aug 20 22:07:23 2013 +0200
+++ b/MoinMoin/converter/_tests/test_mediawiki_in.py	Sun Sep 15 14:02:19 2013 +0200
@@ -125,7 +125,7 @@
 |test
 |}
 """, u'<page><body><table style="border-width: 1px;"><table-body><table-row><table-cell number-columns-spanned="2" style="border-style: solid; border-width: 1px">Orange\nApple</table-cell></table-row><table-row><table-cell number-rows-spanned="2">Bread</table-cell><table-cell>Pie</table-cell></table-row><table-row><table-cell>test</table-cell></table-row></table-body></table></body></page>'),
-("""{|
+            ("""{|
 |class="test"|text||style="border:1px"|test
 |}
 """, u'<page><body><table><table-body><table-row><table-cell class="test">text</table-cell><table-cell style="border:1px">test</table-cell></table-row></table-body></table></body></page>'),
--- a/MoinMoin/items/__init__.py	Tue Aug 20 22:07:23 2013 +0200
+++ b/MoinMoin/items/__init__.py	Sun Sep 15 14:02:19 2013 +0200
@@ -397,7 +397,7 @@
     def modify(self, meta, data, comment=u'', contenttype_guessed=None, **update_meta):
         meta = dict(meta)  # we may get a read-only dict-like, copy it
         # get rid of None values
-        update_meta = {key:value for key, value in update_meta.items() if value is not None}
+        update_meta = {key: value for key, value in update_meta.items() if value is not None}
         meta.update(update_meta)
         return self._save(meta, data, contenttype_guessed=contenttype_guessed, comment=comment)
 
--- a/setup.cfg	Tue Aug 20 22:07:23 2013 +0200
+++ b/setup.cfg	Sun Sep 15 14:02:19 2013 +0200
@@ -50,6 +50,7 @@
  *.py E125  # continuation line does not distinguish itself from next logical line (difficult to avoid!)
  *.py E501  # maximum line length (see also pep8maxlinelength)
  MoinMoin/config/default.py E501  # maximum line length (long lines expected there)
+ MoinMoin/config/default.py E122  # continuation line missing indentation or outdented
  MoinMoin/constants/chartypes.py E501  # auto-generated, long lines
  wikiconfig_*.py ALL  # local stuff, not in the repo
  MoinMoin/script/migration/moin19/_logfile19.py ALL  # legacy code "as is"