changeset 2589:ee404f81afe9

fix new pep8 errors generated after pep8 is upgraded to 1.5.1
author RogerHaase <haaserd@gmail.com>
date Wed, 02 Apr 2014 14:55:54 -0700
parents 16840b339832
children 92a9c6ef1ec7
files MoinMoin/_tests/ldap_testbase.py MoinMoin/_tests/test_wikiutil.py MoinMoin/apps/admin/views.py MoinMoin/apps/frontend/views.py MoinMoin/auth/__init__.py MoinMoin/auth/_tests/test_ldap_login.py MoinMoin/auth/ldap_login.py MoinMoin/config/default.py MoinMoin/conftest.py MoinMoin/converter/__init__.py MoinMoin/converter/_tests/test_html_in_out.py MoinMoin/converter/docbook_in.py MoinMoin/converter/docbook_out.py MoinMoin/converter/html_out.py MoinMoin/converter/mediawiki_in.py MoinMoin/converter/moinwiki_in.py MoinMoin/converter/moinwiki_out.py MoinMoin/converter/rst_in.py MoinMoin/converter/rst_out.py MoinMoin/items/__init__.py MoinMoin/items/content.py MoinMoin/log.py MoinMoin/macro/Date.py MoinMoin/mail/sendmail.py MoinMoin/script/migration/moin19/import19.py MoinMoin/security/__init__.py MoinMoin/storage/middleware/_tests/test_indexing.py MoinMoin/storage/middleware/validation.py MoinMoin/storage/stores/sqla.py MoinMoin/storage/stores/sqlite.py MoinMoin/themes/__init__.py MoinMoin/themes/_tests/test_navi_bar.py MoinMoin/user.py MoinMoin/util/__init__.py MoinMoin/util/_tests/test_diff_html.py MoinMoin/util/_tests/test_mimetype.py MoinMoin/util/diff3.py MoinMoin/util/diff_html.py MoinMoin/util/filesys.py MoinMoin/util/forms.py MoinMoin/util/interwiki.py MoinMoin/util/paramparser.py MoinMoin/util/plugins.py MoinMoin/util/pysupport.py MoinMoin/util/registry.py MoinMoin/wikiutil.py contrib/wsgi/raw_wsgi_bench.py setup.py wikiconfig.py
diffstat 49 files changed, 168 insertions(+), 163 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/ldap_testbase.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/_tests/ldap_testbase.py	Wed Apr 02 14:55:54 2014 -0700
@@ -36,8 +36,9 @@
 """
 
 
-SLAPD_EXECUTABLE = 'slapd'  # filename of LDAP server executable - if it is not
-                            # in your PATH, you have to give full path/filename.
+# filename of LDAP server executable - if it is not
+# in your PATH, you have to give full path/filename.
+SLAPD_EXECUTABLE = 'slapd'
 
 import os
 import shutil
--- a/MoinMoin/_tests/test_wikiutil.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/_tests/test_wikiutil.py	Wed Apr 02 14:55:54 2014 -0700
@@ -209,7 +209,7 @@
     result = wikiutil.containsConflictMarker("/!\\ '''Edit conflict - Conflict marker is present")
     assert result
 
-    #text without conflict marker
+    # text without conflict marker
     result = wikiutil.containsConflictMarker('No conflict marker')
     assert not result
 
--- a/MoinMoin/apps/admin/views.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/apps/admin/views.py	Wed Apr 02 14:55:54 2014 -0700
@@ -130,7 +130,7 @@
             if cls == defaultconfig.ConfigFunctionality:
                 break
             for name in cls.__dict__:
-                if not name in dedup:
+                if name not in dedup:
                     dedup[name] = True
                     yield name, cls.__dict__[name]
 
--- a/MoinMoin/apps/frontend/views.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/apps/frontend/views.py	Wed Apr 02 14:55:54 2014 -0700
@@ -198,9 +198,7 @@
                     ITEMLINKS, ITEMTRANSCLUSIONS, 'refs', ]:
             value = lookup_form[key].value
             if value:
-                if (key in [ITEMID, REVID, USERID, ] and len(value) < crypto.UUID_LEN
-                    or
-                    key in [NAME_EXACT]):
+                if (key in [ITEMID, REVID, USERID, ] and len(value) < crypto.UUID_LEN or key in [NAME_EXACT]):
                     term = Prefix(key, value)
                 elif key == 'refs':
                     term = Or([Term(ITEMLINKS, value), Term(ITEMTRANSCLUSIONS, value)])
@@ -281,8 +279,8 @@
         query = search_form['q'].value
         history = bool(request.values.get('history'))
     if valid or ajax:
-        #most fields in the schema use a StandardAnalyzer, it omits fairly frequently used words
-        #this finds such words and reports to the user
+        # most fields in the schema use a StandardAnalyzer, it omits fairly frequently used words
+        # this finds such words and reports to the user
         analyzer = StandardAnalyzer()
         omitted_words = [token.text for token in analyzer(query, removestops=False) if token.stopped]
 
@@ -319,7 +317,7 @@
             _filter = Or(terms)
 
         with flaskg.storage.indexer.ix[idx_name].searcher() as searcher:
-            #terms is set to retrieve list of terms which matched, in the searchtemplate, for highlight.
+            # terms is set to retrieve list of terms which matched, in the searchtemplate, for highlight.
             flaskg.clock.start('search')
             results = searcher.search(q, filter=_filter, limit=100, terms=True)
             flaskg.clock.stop('search')
@@ -1325,8 +1323,7 @@
     success = False
     if u and token and u.validate_recovery_token(token):
         unvalidated_email = u.profile[EMAIL_UNVALIDATED]
-        if (app.cfg.user_email_unique and
-            user.search_users(**{EMAIL: unvalidated_email})):
+        if (app.cfg.user_email_unique and user.search_users(**{EMAIL: unvalidated_email})):
             msg = _('This email is already in use.')
         else:
             if u.disabled:
@@ -1627,7 +1624,7 @@
         display_name = OptionalText.using(label=L_('Display-Name')).with_properties(
             placeholder=L_("Your display name (informational)"))
         openid = YourOpenID.using(optional=True)
-        #_timezones_keys = sorted(Locale('en').time_zones.keys())
+        # _timezones_keys = sorted(Locale('en').time_zones.keys())
         _timezones_keys = [unicode(tz) for tz in pytz.common_timezones]
         timezone = Select.using(label=L_('Timezone')).out_of((e, e) for e in _timezones_keys)
         _supported_locales = [Locale('en')] + app.babel_instance.list_translations()
@@ -1692,7 +1689,7 @@
                 else:
                     if part == 'personal':
                         if (form['openid'].value and form['openid'].value != flaskg.user.openid and
-                            user.search_users(openid=form['openid'].value)):
+                                user.search_users(openid=form['openid'].value)):
                             # duplicate openid
                             response['flash'].append((_("This openid is already in use."), "error"))
                             success = False
@@ -1706,7 +1703,7 @@
                                     success = False
                     if part == 'notification':
                         if (form['email'].value != flaskg.user.email and
-                            user.search_users(**{EMAIL: form['email'].value}) and app.cfg.user_email_unique):
+                                user.search_users(**{EMAIL: form['email'].value}) and app.cfg.user_email_unique):
                             # duplicate email
                             response['flash'].append((_('This email is already in use'), 'error'))
                             success = False
@@ -1716,7 +1713,7 @@
                         for k, v in d.items():
                             flaskg.user.profile[k] = v
                         if (part == 'notification' and app.cfg.user_email_verification and
-                            form['email'].value != user_old_email):
+                                form['email'].value != user_old_email):
                             flaskg.user.profile[EMAIL] = user_old_email
                             flaskg.user.profile[EMAIL_UNVALIDATED] = form['email'].value
                             # send verification mail
--- a/MoinMoin/auth/__init__.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/auth/__init__.py	Wed Apr 02 14:55:54 2014 -0700
@@ -409,7 +409,7 @@
             url = url.replace('%return', url_quote(nextstage))
             abort(redirect(url))
         msg = ret.message
-        if msg and not msg in flaskg._login_messages:
+        if msg and msg not in flaskg._login_messages:
             flaskg._login_messages.append(msg)
 
         if not cont:
--- a/MoinMoin/auth/_tests/test_ldap_login.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/auth/_tests/test_ldap_login.py	Wed Apr 02 14:55:54 2014 -0700
@@ -52,7 +52,7 @@
 
     class Config(wikiconfig.Config):
         from MoinMoin.auth.ldap_login import LDAPAuth
-        #ToDo get these vars from the test environment
+        # ToDo get these vars from the test environment
         server_uri = 'ldap://127.0.0.1:3890'
         base_dn = 'ou=testing,dc=example,dc=org'
 
@@ -95,7 +95,7 @@
     class Config(wikiconfig.Config):
         from MoinMoin.auth.ldap_login import LDAPAuth
         from MoinMoin.auth import MoinAuth
-        #ToDo get these vars from the test environment
+        # ToDo get these vars from the test environment
         server_uri = 'ldap://127.0.0.1:3890'
         base_dn = 'ou=testing,dc=example,dc=org'
         ldap_auth = LDAPAuth(server_uri=server_uri, base_dn=base_dn, autocreate=True)
@@ -118,7 +118,7 @@
         assert u1.valid
 
         # now we kill the LDAP server:
-        #self.ldap_env.slapd.stop()
+        # self.ldap_env.slapd.stop()
 
         # now try a MoinAuth login:
         # try the default password that worked in 1.7 up to rc1:
@@ -196,7 +196,7 @@
 
     class Config(wikiconfig.Config):
         from MoinMoin.auth.ldap_login import LDAPAuth
-        #ToDo get these vars from the test environment
+        # ToDo get these vars from the test environment
         server_uri = 'ldap://127.0.0.1:3891'
         base_dn = 'ou=testing,dc=example,dc=org'
         ldap_auth1 = LDAPAuth(server_uri=server_uri, base_dn=base_dn,
--- a/MoinMoin/auth/ldap_login.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/auth/ldap_login.py	Wed Apr 02 14:55:54 2014 -0700
@@ -50,22 +50,22 @@
         bind_dn='',  # We can either use some fixed user and password for binding to LDAP.
                      # Be careful if you need a % char in those strings - as they are used as
                      # a format string, you have to write %% to get a single % in the end.
-                     #bind_dn = 'binduser@example.org' # (AD)
-                     #bind_dn = 'cn=admin,dc=example,dc=org' # (OpenLDAP)
-                     #bind_pw = 'secret'
+                     # bind_dn = 'binduser@example.org' # (AD)
+                     # bind_dn = 'cn=admin,dc=example,dc=org' # (OpenLDAP)
+                     # bind_pw = 'secret'
                      # or we can use the username and password we got from the user:
-                     #bind_dn = '%(username)s@example.org' # DN we use for first bind (AD)
-                     #bind_pw = '%(password)s' # password we use for first bind
+                     # bind_dn = '%(username)s@example.org' # DN we use for first bind (AD)
+                     # bind_pw = '%(password)s' # password we use for first bind
                      # or we can bind anonymously (if that is supported by your directory).
                      # In any case, bind_dn and bind_pw must be defined.
         bind_pw='',
         base_dn='',  # base DN we use for searching
-                     #base_dn = 'ou=SOMEUNIT,dc=example,dc=org'
+                     # base_dn = 'ou=SOMEUNIT,dc=example,dc=org'
         scope=ldap.SCOPE_SUBTREE,  # scope of the search we do (2 == ldap.SCOPE_SUBTREE)
         referrals=0,  # LDAP REFERRALS (0 needed for AD)
         search_filter='(uid=%(username)s)',  # ldap filter used for searching:
-                                             #search_filter = '(sAMAccountName=%(username)s)' # (AD)
-                                             #search_filter = '(uid=%(username)s)' # (OpenLDAP)
+                                             # search_filter = '(sAMAccountName=%(username)s)' # (AD)
+                                             # search_filter = '(uid=%(username)s)' # (OpenLDAP)
                                              # you can also do more complex filtering like:
                                              # "(&(cn=%(username)s)(memberOf=CN=WikiUsers,OU=Groups,DC=example,DC=org))"
         # some attribute names we use to extract information from LDAP:
@@ -149,7 +149,7 @@
                         (ldap.OPT_X_TLS_KEYFILE, self.tls_keyfile),
                         (ldap.OPT_X_TLS_REQUIRE_CERT, self.tls_require_cert),
                         (ldap.OPT_X_TLS, self.start_tls),
-                        #(ldap.OPT_X_TLS_ALLOW, 1),
+                        # (ldap.OPT_X_TLS_ALLOW, 1),
                     ):
                         if value is not None:
                             ldap.set_option(option, value)
--- a/MoinMoin/config/default.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/config/default.py	Wed Apr 02 14:55:54 2014 -0700
@@ -103,7 +103,7 @@
             if auth.logout_possible and auth.name:
                 self.auth_can_logout.append(auth.name)
             for input in auth.login_inputs:
-                if not input in self.auth_login_inputs:
+                if input not in self.auth_login_inputs:
                     self.auth_login_inputs.append(input)
         self.auth_have_login = len(self.auth_login_inputs) > 0
         self.auth_methods = found_names
@@ -342,12 +342,12 @@
             # thus either needs compiling or installing platform-specific binaries)
             schemes=["sha512_crypt", ],
             # default scheme for creating new pw hashes (if not given, passlib uses first from schemes)
-            #default="sha512_crypt",
+            # default="sha512_crypt",
             # deprecated schemes get auto-upgraded to the default scheme at login
             # time or when setting a password (including doing a moin account pwreset).
-            #deprecated=["auto"],
+            # deprecated=["auto"],
             # vary rounds parameter randomly when creating new hashes...
-            #all__vary_rounds=0.1,
+            # all__vary_rounds=0.1,
         ), "passlib CryptContext arguments, see passlib docs"),
     )),
     # ==========================================================================
@@ -431,7 +431,7 @@
     # ==========================================================================
     'editor': ('Editor', None, (
         ('item_license', u'', 'if set, show the license item within the editor. [Unicode]'),
-        #('edit_locking', 'warn 10', "Editor locking policy: `None`, `'warn <timeout in minutes>'`, or `'lock <timeout in minutes>'`"),
+        # ('edit_locking', 'warn 10', "Editor locking policy: `None`, `'warn <timeout in minutes>'`, or `'lock <timeout in minutes>'`"),
         ('edit_ticketing', True, None),
     )),
     # ==========================================================================
--- a/MoinMoin/conftest.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/conftest.py	Wed Apr 02 14:55:54 2014 -0700
@@ -100,7 +100,7 @@
             prev_app, prev_ctx, prev_cfg = None, None, None
 
         super(MoinTestFunction, self).setup()
-        #XXX: hack till we get better funcarg tools
+        # XXX: hack till we get better funcarg tools
         if hasattr(self._obj, 'im_self'):
             self._obj.im_self.app = self.app
 
--- a/MoinMoin/converter/__init__.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/__init__.py	Wed Apr 02 14:55:54 2014 -0700
@@ -29,7 +29,7 @@
     class Entry(namedtuple('Entry', 'factory type_input type_output priority')):
         def __call__(self, type_input, type_output, **kw):
             if (self.type_output.issupertype(type_output) and
-                self.type_input.issupertype(type_input)):
+                    self.type_input.issupertype(type_input)):
                 return self.factory(type_input, type_output, **kw)
 
         def __lt__(self, other):
--- a/MoinMoin/converter/_tests/test_html_in_out.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/_tests/test_html_in_out.py	Wed Apr 02 14:55:54 2014 -0700
@@ -178,7 +178,7 @@
                 '/div/div/ul[li="Item"]'),
             ('<div><ul><li>Item 1</li><p>Pouet</p><li>Item 2</li><li>Item 3</li></ul></div>',
                 '/div/ul[li[1]="Item 1"][li[2]="Item 2"][li[3]="Item 3"]'),
-            #Test for bug with line return and spaces
+            # Test for bug with line return and spaces
             ('<div><ul><li>\n Item 1</li>\n<li>\n Item 2</li>\n<li>\n Item 3</li>\n</ul></div>',
                 '/div/ul[li[1]="\n Item 1"][li[2]="\n Item 2"][li[3]="\n Item 3"]'),
             ('<div><ol><li>\n Item 1</li>\n<li>\n Item 2</li>\n<li>\n Item 3</li>\n</ol></div>',
@@ -189,7 +189,7 @@
 
     def test_object(self):
         data = [
-            #('<html><div><img src="uri:test" /></div></html>',
+            # ('<html><div><img src="uri:test" /></div></html>',
             #  '/page/body/div/object/@xlink:href="uri:test"'),
             ('<html><div><object data="href"></object></div></html>',
                 '/div/div/div/object[@data="href"]'),
--- a/MoinMoin/converter/docbook_in.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/docbook_in.py	Wed Apr 02 14:55:54 2014 -0700
@@ -381,7 +381,7 @@
             return self.visit_simple_tag(element, depth)
 
         # We have a media element
-        #if element.tag.name in self.media_tags:
+        # if element.tag.name in self.media_tags:
         #    return self.visit_data_object(element, depth)
 
         # We should ignore this element
@@ -456,7 +456,7 @@
                     object_to_show = obj
                     break
             else:
-                #XXX: Maybe we could add some verification over the
+                # XXX: Maybe we could add some verification over the
                 #     extension of the file
                 object_to_show = obj
 
@@ -584,10 +584,10 @@
                     para_element = child
 
         if not title_element:
-            #XXX: Improve error
+            # XXX: Improve error
             raise SyntaxError("title child missing for formalpara element")
         if not para_element:
-            #XXX: Improve error
+            # XXX: Improve error
             raise SyntaxError("para child missing for formalpara element")
 
         children = self.do_children(para_element, depth + 1)[0]
--- a/MoinMoin/converter/docbook_out.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/docbook_out.py	Wed Apr 02 14:55:54 2014 -0700
@@ -251,7 +251,7 @@
             self.parent_section = self.current_section
             self.current_section = int(depth)
             self.section_children[self.current_section] = []
-            #NB : Error with docbook.title
+            # NB : Error with docbook.title
             title = ET.Element(docbook('title'), attrib={}, children=element[0])
             self.section_children[self.current_section].append(title)
 
@@ -383,7 +383,7 @@
         # TODO: Attributes conversion
         title = element.get(html('title'))
         if not title:
-            #TODO: Translation
+            # TODO: Translation
             title = "Table {0}".format(self.table_counter)
         self.table_counter += 1
         caption = ET.Element(docbook('caption'), attrib={}, children=[title])
@@ -415,7 +415,7 @@
         return self.new_copy(docbook.tfoot, element, attrib={})
 
     def visit_moinpage_table_row(self, element):
-        #TODO: Attributes conversion
+        # TODO: Attributes conversion
         return self.new_copy(docbook.tr, element, attrib={})
 
     def handle_simple_list(self, docbook_tag, element, attrib):
--- a/MoinMoin/converter/html_out.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/html_out.py	Wed Apr 02 14:55:54 2014 -0700
@@ -115,7 +115,7 @@
             if key.uri == moin_page:
                 # We never have _ in attribute names, so ignore them instead of
                 # create ambigues matches.
-                if not '_' in key.name:
+                if '_' not in key.name:
                     n = 'visit_' + key.name.replace('-', '_')
                     f = getattr(self, n, None)
                     if f is not None:
@@ -127,7 +127,7 @@
                 if key.name == 'id' or key.name == 'lang':
                     new[ET.QName(key.name, html.namespace)] = value
             elif key.uri is None:
-                if self.default_uri_input and not '_' in key.name:
+                if self.default_uri_input and '_' not in key.name:
                     n = 'visit_' + key.name.replace('-', '_')
                     f = getattr(self, n, None)
                     if f is not None:
--- a/MoinMoin/converter/mediawiki_in.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/mediawiki_in.py	Wed Apr 02 14:55:54 2014 -0700
@@ -484,7 +484,7 @@
 
     def inline_footnote_repl(self, stack, footnote,
                              footnote_begin=None, footnote_text=None, footnote_end=None, footnote_start=None):
-        #stack.top_check('emphasis'):
+        # stack.top_check('emphasis'):
         if footnote_begin is not None:
             stack.push(moin_page.note(attrib={moin_page.note_class: 'footnote'}))
             stack.push(moin_page.note_body())
@@ -794,7 +794,7 @@
     inline_re = re.compile('|'.join(inline), re.X | re.U)
 
     inlinedesc = (
-        #inline_macro,
+        # inline_macro,
         inline_breakline,
         inline_nowiki,
         inline_emphstrong,
@@ -802,7 +802,7 @@
     inlinedesc_re = re.compile('|'.join(inlinedesc), re.X | re.U)
 
     # Nowiki end
-    #nowiki_end_re = re.compile(nowiki_end, re.X)
+    # nowiki_end_re = re.compile(nowiki_end, re.X)
 
     # Table
     table_re = re.compile(table, re.X | re.U)
@@ -904,7 +904,7 @@
                             tag_name = tag_match.group(1).split(' ')[0]
                         else:
                             tag_name = tag.split(' ')[0]
-                        if not tag_name in self.all_tags or re.match(r'.*/\s*$', tag)\
+                        if tag_name not in self.all_tags or re.match(r'.*/\s*$', tag)\
                                 or self.nowiki and (status or tag_name != self.nowiki_tag):
                             if not len(tags):
                                 post_line.append('<{0}>'.format(tag))
@@ -957,7 +957,7 @@
         """
         data = dict(((str(k), v) for k, v in match.groupdict().iteritems() if v is not None))
         func = '{0}_{1}_repl'.format(prefix, match.lastgroup)
-        #logging.debug("calling %s(%r, %r)" % (func, args, data))
+        # logging.debug("calling %s(%r, %r)" % (func, args, data))
         getattr(self, func)(*args, **data)
 
     def parse_block(self, iter_content, arguments):
--- a/MoinMoin/converter/moinwiki_in.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/moinwiki_in.py	Wed Apr 02 14:55:54 2014 -0700
@@ -1025,7 +1025,7 @@
         """
         data = dict(((str(k), v) for k, v in match.groupdict().iteritems() if v is not None))
         func = '{0}_{1}_repl'.format(prefix, match.lastgroup)
-        #logging.debug("calling %s(%r, %r)" % (func, args, data))
+        # logging.debug("calling %s(%r, %r)" % (func, args, data))
         getattr(self, func)(*args, **data)
 
     def parse_block(self, iter_content, arguments):
--- a/MoinMoin/converter/moinwiki_out.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/moinwiki_out.py	Wed Apr 02 14:55:54 2014 -0700
@@ -131,7 +131,7 @@
         childrens_output = []
         for child in elem:
             if isinstance(child, ET.Element):
-            # open function can change self.output
+                # open function can change self.output
                 childrens_output.append(self.open(child))
             else:
                 ret = u''
--- a/MoinMoin/converter/rst_in.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/rst_in.py	Wed Apr 02 14:55:54 2014 -0700
@@ -38,14 +38,14 @@
 
 from ._util import allowed_uri_scheme, decode_data, normalize_split_text
 
-#### TODO: try block (do not crash if we don't have docutils)
+# ### TODO: try block (do not crash if we don't have docutils)
 pytest.importorskip('docutils')
 from docutils import nodes, utils, writers, core
 from docutils.parsers.rst import Parser
 from docutils.nodes import reference, literal_block
 from docutils.parsers import rst
 from docutils.parsers.rst import directives, roles
-#####
+# ####
 
 
 class NodeVisitor(object):
@@ -349,9 +349,9 @@
             if node.get(key):
                 attr[html(key)] = node.get(key)
 
-        #there is no 'scale' attribute, hence absent from whitelist, handled separately
-        #TODO: Error reporting in case of bad input, currently prints on terminal
-        #TODO: mark_item_as_transclusion in html_out conflicts 'align' by adding item-wrapper
+        # there is no 'scale' attribute, hence absent from whitelist, handled separately
+        # TODO: Error reporting in case of bad input, currently prints on terminal
+        # TODO: mark_item_as_transclusion in html_out conflicts 'align' by adding item-wrapper
 
         if node.get('scale'):
             scaling_factor = int(node.get('scale')) / 100.0
@@ -668,10 +668,10 @@
         # used for MoinMoin macros
         directives.register_directive('macro', self.macro)
 
-        #used for MoinMoin tables of content
+        # used for MoinMoin tables of content
         directives.register_directive('contents', self.table_of_content)
 
-        #used for MoinMoin parsers
+        # used for MoinMoin parsers
         directives.register_directive('parser', self.parser)
 
         # disallow a few directives in order to prevent XSS
--- a/MoinMoin/converter/rst_out.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/converter/rst_out.py	Wed Apr 02 14:55:54 2014 -0700
@@ -389,7 +389,7 @@
                     text += u"~"
         self.used_references.append((text, href))
         self.all_used_references.append((text, href))
-        #self.objects.append("\n\n.. _%s: %s\n\n" % (text, href))
+        # self.objects.append("\n\n.. _%s: %s\n\n" % (text, href))
         return u"`{0}`_".format(text)
 
     def open_moinpage_blockcode(self, elem):
@@ -562,7 +562,7 @@
                                         * (len(u''.join(self.list_item_labels))
                                            + len(self.list_item_labels)) + self.open_children(elem))
             elif self.last_closed and self.last_closed == 'p':
-                #return ReST.p +\
+                # return ReST.p +\
                 ret = (u"\n" + u' ' * (len(u''.join(self.list_item_labels))
                                        + len(self.list_item_labels)) + self.open_children(elem))
             else:
--- a/MoinMoin/items/__init__.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/items/__init__.py	Wed Apr 02 14:55:54 2014 -0700
@@ -209,7 +209,7 @@
     acl = RequiredText.using(label=L_("ACL")).with_properties(placeholder=L_("Access Control List")).validated_by(ACLValidator())
     # Disabled - Flatland doesn't distinguish emtpy value and nonexistent
     # value, while an emtpy acl and no acl have different semantics
-    #acl = OptionalText.using(label=L_('ACL')).with_properties(placeholder=L_("Access Control List"))
+    # acl = OptionalText.using(label=L_('ACL')).with_properties(placeholder=L_("Access Control List"))
     summary = OptionalText.using(label=L_("Summary")).with_properties(placeholder=L_("One-line summary of the item"))
     name = Names
     tags = Tags
@@ -319,7 +319,7 @@
         rev = get_storage_revision(fqname, itemtype, contenttype, rev_id, item)
         contenttype = rev.meta.get(CONTENTTYPE) or contenttype
         logging.debug("Item {0!r}, got contenttype {1!r} from revision meta".format(name, contenttype))
-        #logging.debug("Item %r, rev meta dict: %r" % (name, dict(rev.meta)))
+        # logging.debug("Item %r, rev meta dict: %r" % (name, dict(rev.meta)))
 
         # XXX Cannot pass item=item to Content.__init__ via
         # content_registry.get yet, have to patch it later.
@@ -679,7 +679,7 @@
             for fullname in fullnames:
                 prefix = self.get_prefix_match(fullname, prefixes)
                 fullname_fqname = CompositeName(rev.meta[NAMESPACE], NAME_EXACT, fullname)
-                if not prefix is None:
+                if prefix is not None:
                     relname = fullname[len(prefix):]
                     if '/' in relname:
                         # Find the *direct* subitem that is the ancestor of current
--- a/MoinMoin/items/content.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/items/content.py	Wed Apr 02 14:55:54 2014 -0700
@@ -456,7 +456,7 @@
         :param content_length: byte-length of content (for str, None can be given)
         :param expected_members: set of expected member file names
         """
-        if not name in expected_members:
+        if name not in expected_members:
             raise StorageError("tried to add unexpected member {0!r} to container item {1!r}".format(name, self.name))
         if isinstance(name, unicode):
             name = name.encode('utf-8')
@@ -1129,7 +1129,7 @@
             filecontent = filecontent.read()  # read file completely into memory
             filecontent = filecontent.strip()
         elif ext == '.png':
-            #content_length = file_upload.content_length
+            # content_length = file_upload.content_length
             # XXX gives -1 for wsgiref, gives 0 for werkzeug :(
             # If this is fixed, we could use the file obj, without reading it into memory completely:
             filecontent = filecontent.read()
@@ -1183,7 +1183,7 @@
             self.drawing_exists = drawing_exists
 
     def _transform_map(self, image_map, title):
-        #drawing_url = url_for('frontend.get_item', item_name=self.name, member='drawing.svg', rev=self.rev.revid)
+        # drawing_url = url_for('frontend.get_item', item_name=self.name, member='drawing.svg', rev=self.rev.revid)
         mapid = 'ImageMapOf' + self.name  # TODO: make it unique
         image_map = image_map.replace(u'id="drawing.svg"', '')
         image_map = image_map.replace(u'name="drawing.svg"', u'name="{0}"'.format(mapid))
--- a/MoinMoin/log.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/log.py	Wed Apr 02 14:55:54 2014 -0700
@@ -107,15 +107,16 @@
 import warnings
 
 # use something like this to ignore warnings:
-#warnings.filterwarnings('ignore', r'... regex for warning message to ignore ...')
+# warnings.filterwarnings('ignore', r'... regex for warning message to ignore ...')
 
 
 def _log_warning(message, category, filename, lineno, file=None, line=None):
     # for warnings, we just want to use the logging system, not stderr or other files
     msg = "{0}:{1}: {2}: {3}".format(filename, lineno, category.__name__, message)
     logger = getLogger(__name__)
-    logger.warning(msg)  # Note: the warning will look like coming from here,
-                         # but msg contains info about where it really comes from
+    # Note: the warning will look like coming from here,
+    # but msg contains info about where it really comes from
+    logger.warning(msg)
 
 
 def load_config(conf_fname=None):
--- a/MoinMoin/macro/Date.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/macro/Date.py	Wed Apr 02 14:55:54 2014 -0700
@@ -24,7 +24,7 @@
         :returns: UNIX timestamp (UTC)
         """
         if (len(args) >= 19 and args[4] == '-' and args[7] == '-' and
-            args[10] == 'T' and args[13] == ':' and args[16] == ':'):
+                args[10] == 'T' and args[13] == ':' and args[16] == ':'):
             # we ignore any time zone offsets here, assume UTC,
             # and accept (and ignore) any trailing stuff
             try:
--- a/MoinMoin/mail/sendmail.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/mail/sendmail.py	Wed Apr 02 14:55:54 2014 -0700
@@ -160,7 +160,7 @@
             host, port = (cfg.mail_smarthost + ':25').split(':')[:2]
             server = smtplib.SMTP(host, int(port))
             try:
-                #server.set_debuglevel(1)
+                # server.set_debuglevel(1)
                 if cfg.mail_username is not None and cfg.mail_password is not None:
                     try:  # try to do TLS
                         server.ehlo()
--- a/MoinMoin/script/migration/moin19/import19.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/script/migration/moin19/import19.py	Wed Apr 02 14:55:54 2014 -0700
@@ -384,8 +384,8 @@
                 del result[EXTRA]
                 result[ACTION] = ACTION_REVERT
         userid = result[USERID]
-        #TODO
-        #if userid:
+        # TODO
+        # if userid:
         #    result[USERID] = self.idx.user_uuid(old_id=userid, refcount=True)
         return result
 
@@ -408,8 +408,8 @@
         """ Find metadata for some attachment name in the edit-log. """
         for meta in self.reverse():  # use reverse iteration to get the latest upload's data
             if (meta['__rev'] == 99999998 and  # 99999999-1 because of 0-based
-                meta[ACTION] == 'ATTNEW' and
-                meta[EXTRA] == attachname):
+                    meta[ACTION] == 'ATTNEW' and
+                    meta[EXTRA] == attachname):
                 break
         else:
             self.to_end()
--- a/MoinMoin/security/__init__.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/security/__init__.py	Wed Apr 02 14:55:54 2014 -0700
@@ -256,8 +256,9 @@
                             handler = getattr(self, "_special_" + special, None)
                             allowed = handler(name, dowhat, rightsdict)
                             break  # order of self.special_users is important
-            elif entry == name:  # XXX TODO maybe change this to "entry in names"
-                                 # to check users with multiple names in one go
+            # XXX TODO maybe change this to "entry in names"
+            # to check users with multiple names in one go
+            elif entry == name:
                 allowed = rightsdict.get(dowhat)
             if allowed is not None:
                 return allowed
--- a/MoinMoin/storage/middleware/_tests/test_indexing.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/storage/middleware/_tests/test_indexing.py	Wed Apr 02 14:55:54 2014 -0700
@@ -466,6 +466,6 @@
         for i in xrange(100):
             item.store_revision(dict(name=[item_name, ], acl=u'joe:create joe:read'), StringIO('rev number {0}'.format(i)))
         for r in item.iter_revs():
-            #print r.meta
-            #print r.data.read()
+            # print r.meta
+            # print r.data.read()
             pass
--- a/MoinMoin/storage/middleware/validation.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/storage/middleware/validation.py	Wed Apr 02 14:55:54 2014 -0700
@@ -200,7 +200,7 @@
     v = element.value
     if not isinstance(v, (int, long)):
         return False
-    #if v < 31 * 24 * 3600:
+    # if v < 31 * 24 * 3600:
     #    # we don't have negative values nor timestamps from Jan 1970,
     #    # this likely was some crap 0 +/- maybe tz adjustments
     #    return False
@@ -238,9 +238,9 @@
         if not isinstance(v, unicode):
             return False
         # TODO check parent revision acl / whether acl would be changed
-        #acl_changed = v != state['acl_parent']
-        #is_admin = False
-        #if acl_changed and not is_admin:
+        # acl_changed = v != state['acl_parent']
+        # is_admin = False
+        # if acl_changed and not is_admin:
         #    return False
         return True
 
@@ -422,7 +422,7 @@
     List.named(keys.QUICKLINKS).of(String.named('quicklinks')).using(optional=True),
     List.named(keys.SUBSCRIPTIONS).of(String.named('subscription').validated_by(subscription_validator)).using(optional=True),
     List.named(keys.EMAIL_SUBSCRIBED_EVENTS).of(String.named('email_subscribed_event')).using(optional=True),
-    #TODO: DuckDict.named('bookmarks').using(optional=True),
+    # TODO: DuckDict.named('bookmarks').using(optional=True),
     *common_meta
 )
 
--- a/MoinMoin/storage/stores/sqla.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/storage/stores/sqla.py	Wed Apr 02 14:55:54 2014 -0700
@@ -32,8 +32,9 @@
         :param cls: Class to create
         :param uri: The database uri that we pass on to SQLAlchemy.
         """
-        params = uri.split("::")  # using "::" to support windows pathnames that
-                                  # may include ":" after the drive letter.
+        # using "::" to support windows pathnames that
+        # may include ":" after the drive letter.
+        params = uri.split("::")
         return cls(*params)
 
     def __init__(self, db_uri=None, table_name='store', verbose=False):
--- a/MoinMoin/storage/stores/sqlite.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/storage/stores/sqlite.py	Wed Apr 02 14:55:54 2014 -0700
@@ -35,8 +35,9 @@
                     db_name::table_name::compression_level
                     where table_name and compression level are optional
         """
-        params = uri.split("::")  # using "::" to support windows pathnames that
-                                  # may include ":" after the drive letter.
+        # using "::" to support windows pathnames that
+        # may include ":" after the drive letter.
+        params = uri.split("::")
         if len(params) == 3:
             params[2] = int(params[2])
         return cls(*params)
--- a/MoinMoin/themes/__init__.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/themes/__init__.py	Wed Apr 02 14:55:54 2014 -0700
@@ -154,7 +154,7 @@
                         if flaskg.user.valid:
                             href = url_for(endpoint, item_name=item_name)
                             iconcls = icon[endpoint]
-                            #endpoint = iconcls = label = None
+                            # endpoint = iconcls = label = None
 
                             if endpoint == 'frontend.quicklink_item':
                                 if not flaskg.user.is_quicklinked_to([item_name]):
--- a/MoinMoin/themes/_tests/test_navi_bar.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/themes/_tests/test_navi_bar.py	Wed Apr 02 14:55:54 2014 -0700
@@ -23,7 +23,7 @@
 
     def test_split_navilink(self):
         tests = [
-            #(navilink, (href, text, interwiki)),
+            # (navilink, (href, text, interwiki)),
             ('ItemName', ('/ItemName', 'ItemName', '')),
             ('[[ItemName|LinkText]]', ('/ItemName', 'LinkText', '')),
             ('MoinMoin/ItemName', ('http://moinmo.in/ItemName', 'ItemName', 'MoinMoin')),
--- a/MoinMoin/user.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/user.py	Wed Apr 02 14:55:54 2014 -0700
@@ -176,9 +176,10 @@
     :rtype: unicode
     :returns: user name that can be used in acl lines
     """
-    username_allowedchars = "'@.-_"  # ' for names like O'Brian or email addresses.
-                                     # "," and ":" must not be allowed (ACL delimiters).
-                                     # We also allow _ in usernames for nicer URLs.
+    # ' for names like O'Brian or email addresses.
+    # "," and ":" must not be allowed (ACL delimiters).
+    # We also allow _ in usernames for nicer URLs.
+    username_allowedchars = "'@.-_"
     # Strip non alpha numeric characters (except username_allowedchars), keep white space
     name = ''.join([c for c in name if c.isalnum() or c.isspace() or c in username_allowedchars])
 
--- a/MoinMoin/util/__init__.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/__init__.py	Wed Apr 02 14:55:54 2014 -0700
@@ -22,7 +22,7 @@
 
 
 #############################################################################
-### XML helper functions
+# XML helper functions
 #############################################################################
 
 g_xmlIllegalCharPattern = re.compile('[\x01-\x08\x0B-\x0D\x0E-\x1F\x80-\xFF]')
@@ -60,7 +60,7 @@
 
 
 #############################################################################
-### Misc
+# Misc
 #############################################################################
 
 def rangelist(numbers):
--- a/MoinMoin/util/_tests/test_diff_html.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/_tests/test_diff_html.py	Wed Apr 02 14:55:54 2014 -0700
@@ -57,7 +57,7 @@
                  4, '<span>BBB 006<br>BBB 007<br>BBB 008<br>BBB 009<br>BBB 100</span>')]
     assert result == expected
 
-    #Case 2 : charobj.ratio() > 0.5 i.e. Some similarities
+    # Case 2 : charobj.ratio() > 0.5 i.e. Some similarities
     test_input3 = """ \n
 
 AAA 006
--- a/MoinMoin/util/_tests/test_mimetype.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/_tests/test_mimetype.py	Wed Apr 02 14:55:54 2014 -0700
@@ -17,7 +17,7 @@
         MimeType_obj = mimetype.MimeType(filename='test_file.jpg')
         # format in PARSER_TEXT_MIMETYPE
         test = [
-            #test_format, test_mimetype
+            # test_format, test_mimetype
             ('html', ('text', 'html')),
             ('css', ('text', 'css')),
             ('python', ('text', 'python')),
--- a/MoinMoin/util/diff3.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/diff3.py	Wed Apr 02 14:55:54 2014 -0700
@@ -210,7 +210,7 @@
             idx2 += 1
 
     if hit1 and hit2:
-        #XXX which one?
+        # XXX which one?
         return hit1
     elif hit1:
         return hit1
--- a/MoinMoin/util/diff_html.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/diff_html.py	Wed Apr 02 14:55:54 2014 -0700
@@ -22,7 +22,7 @@
     stripped = line.lstrip()
     if len(line) - len(stripped):
         line = u"&nbsp;" * (len(line) - len(stripped)) + stripped
-    #return "%d / %d / %s" % (len(line), len(stripped), line)
+    # return "%d / %d / %s" % (len(line), len(stripped), line)
     return eol + line
 
 
--- a/MoinMoin/util/filesys.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/filesys.py	Wed Apr 02 14:55:54 2014 -0700
@@ -19,7 +19,7 @@
 
 
 #############################################################################
-### Misc Helpers
+# Misc Helpers
 #############################################################################
 
 def chmod(name, mode, catchexception=True):
@@ -159,9 +159,10 @@
     try:
         st = os.stat(filename)
     except (IOError, OSError):
-        uid = None  # for permanent errors on stat() this does not change, but
-                    # having a changing value would be pointless because if we
-                    # can't even stat the file, it is unlikely we can read it.
+        # for permanent errors on stat() this does not change, but
+        # having a changing value would be pointless because if we
+        # can't even stat the file, it is unlikely we can read it.
+        uid = None
     else:
         fake_mtime = int(st.st_mtime)
         if not st.st_ino and max_staleness:
--- a/MoinMoin/util/forms.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/forms.py	Wed Apr 02 14:55:54 2014 -0700
@@ -28,7 +28,7 @@
         return contents
     if tagname == 'input':
         if ('value' not in attributes and
-            attributes.get('type') in ['submit', 'reset', ]):
+                attributes.get('type') in ['submit', 'reset', ]):
             attributes['value'] = _(bind.default_value)
     elif tagname == 'button' and not contents:
         contents = _(bind.default_value)
--- a/MoinMoin/util/interwiki.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/interwiki.py	Wed Apr 02 14:55:54 2014 -0700
@@ -219,7 +219,7 @@
     if not isinstance(wikiurl, unicode):
         wikiurl = wikiurl.decode('utf-8')
     # Base case: no colon in wikiurl
-    if not '/' in wikiurl:
+    if '/' not in wikiurl:
         return u'Self', u'', NAME_EXACT, wikiurl
     wikiname = field = namespace = u''
     if not wikiurl.startswith('/'):
--- a/MoinMoin/util/paramparser.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/paramparser.py	Wed Apr 02 14:55:54 2014 -0700
@@ -139,9 +139,9 @@
     matchingbracket = {}
     if brackets:
         for o, c in brackets:
-            assert not o in opening
+            assert o not in opening
             opening.append(o)
-            assert not c in closing
+            assert c not in closing
             closing.append(c)
             matchingbracket[o] = c
 
@@ -167,7 +167,7 @@
             next = args[idx + 1]
         if skipquote:
             skipquote -= 1
-        if not separator is None and not quoted and char in SPACE:
+        if separator is not None and not quoted and char in SPACE:
             spaces = ''
             # accumulate all space
             while char in SPACE and idx < max - 1:
@@ -454,7 +454,7 @@
             return choices[0]
     elif not isinstance(arg, unicode):
         raise TypeError('Argument must be None or unicode')
-    elif not arg in choices:
+    elif arg not in choices:
         if name:
             raise ValueError(
                 _('Argument "%(name)s" must be one of "%(choices)s", not "%(value)s"',
@@ -533,7 +533,7 @@
             except ValueError:
                 pass
         units = ', '.join(self._units)
-        ## XXX: how can we translate this?
+        # XXX: how can we translate this?
         raise ValueError("Invalid unit in value {0} (allowed units: {1})".format(s, units))
 
     def get_default(self):
@@ -681,7 +681,7 @@
             continue
         if positional:
             kwargs[argname] = positional.pop()
-        if not argname in kwargs:
+        if argname not in kwargs:
             kwargs[argname] = None
         if idx >= defstart:
             defaults[argname] = defaultlist[idx - defstart]
@@ -713,7 +713,7 @@
                 if isinstance(defaults[argname], IEFArgument):
                     kwargs[argname] = defaults[argname].get_default()
 
-        if not argname in argnames:
+        if argname not in argnames:
             # move argname into _kwargs parameter
             kwargs_to_pass[argname] = kwargs[argname]
             del kwargs[argname]
--- a/MoinMoin/util/plugins.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/plugins.py	Wed Apr 02 14:55:54 2014 -0700
@@ -80,7 +80,7 @@
 
     See importPlugin docstring.
     """
-    if not name in builtinPlugins(kind):
+    if name not in builtinPlugins(kind):
         raise PluginMissingError()
     moduleName = 'MoinMoin.{0}.{1}'.format(kind, name)
     return importNameFromPlugin(moduleName, function)
@@ -144,7 +144,7 @@
                 packagepath = os.path.dirname(module.__file__)
                 plugins = pysupport.getPluginModules(packagepath)
                 for p in plugins:
-                    if not p in result:
+                    if p not in result:
                         result[p] = '{0}.{1}'.format(modname, kind)
             except AttributeError:
                 pass
@@ -209,7 +209,7 @@
                 csum = 'p_{0}'.format(hashlib.new('sha1', pdir).hexdigest())
                 modname = '{0}.{1}'.format(cfg.siteid, csum)
                 # If the module is not loaded, try to load it
-                if not modname in sys.modules:
+                if modname not in sys.modules:
                     # Find module on disk and try to load - slow!
                     abspath = os.path.abspath(pdir)
                     parent_dir, pname = os.path.split(abspath)
@@ -218,7 +218,7 @@
                         # Load the module and set in sys.modules
                         module = imp.load_module(modname, fp, path, info)
                         # XXX for what was this good for?:
-                        #setattr(sys.modules[cfg.siteid], 'csum', module)
+                        # setattr(sys.modules[cfg.siteid], 'csum', module)
                     finally:
                         # Make sure fp is closed properly
                         if fp:
--- a/MoinMoin/util/pysupport.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/pysupport.py	Wed Apr 02 14:55:54 2014 -0700
@@ -13,7 +13,7 @@
 
 
 #############################################################################
-### Module import / Plugins
+# Module import / Plugins
 #############################################################################
 
 def load_package_modules(package_name, package_pathes):
--- a/MoinMoin/util/registry.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/util/registry.py	Wed Apr 02 14:55:54 2014 -0700
@@ -65,7 +65,7 @@
         :param factory: Factory to unregister
         """
         old_entries = self._entries
-        entries = [i for i in old_entries if not i.factory is factory]
+        entries = [i for i in old_entries if i.factory is not factory]
         if len(old_entries) == len(entries):
             # TODO: Is this necessary?
             raise ValueError
--- a/MoinMoin/wikiutil.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/MoinMoin/wikiutil.py	Wed Apr 02 14:55:54 2014 -0700
@@ -41,7 +41,7 @@
 
 
 #############################################################################
-### Data validation / cleanup
+# Data validation / cleanup
 #############################################################################
 
 # TODO: use similar code in a flatland validator
@@ -110,7 +110,7 @@
 
 
 #############################################################################
-### Item types / Item names
+# Item types / Item names
 #############################################################################
 
 def isGroupItem(itemname):
@@ -194,7 +194,7 @@
 
 
 #############################################################################
-### Misc
+# Misc
 #############################################################################
 
 def drawing2fname(drawing):
--- a/contrib/wsgi/raw_wsgi_bench.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/contrib/wsgi/raw_wsgi_bench.py	Wed Apr 02 14:55:54 2014 -0700
@@ -30,7 +30,7 @@
     timing = time.time()
     for run in xrange(RUNS):
         appiter, status, headers = client.get('/%s' % page)
-        #result = ''.join(appiter)
+        # result = ''.join(appiter)
         if ((run + 1) % RUNS_MARKER == 0):
             sys.stdout.write('%i' % (run + 1))
         elif ((run + 1) % DOTS_MARKER == 0):
--- a/setup.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/setup.py	Wed Apr 02 14:55:54 2014 -0700
@@ -27,28 +27,29 @@
     license="GNU GPL v2 (or any later version)",
     keywords="wiki web",
     platforms="any",
-    classifiers="""\
-Development Status :: 2 - Pre-Alpha
-Environment :: Web Environment
-Intended Audience :: Education
-Intended Audience :: End Users/Desktop
-Intended Audience :: Information Technology
-Intended Audience :: Other Audience
-Intended Audience :: Science/Research
-License :: OSI Approved :: GNU General Public License (GPL)
-Natural Language :: English
-Operating System :: OS Independent
-Programming Language :: Python
-Programming Language :: Python :: 2.7
-Topic :: Internet :: WWW/HTTP :: WSGI
-Topic :: Internet :: WWW/HTTP :: WSGI :: Application
-Topic :: Internet :: WWW/HTTP :: Dynamic Content
-Topic :: Office/Business :: Groupware
-Topic :: Text Processing :: Markup""".splitlines(),
+    classifiers=[
+        "Development Status :: 2 - Pre-Alpha",
+        "Environment :: Web Environment",
+        "Intended Audience :: Education",
+        "Intended Audience :: End Users/Desktop",
+        "Intended Audience :: Information Technology",
+        "Intended Audience :: Other Audience",
+        "Intended Audience :: Science/Research",
+        "License :: OSI Approved :: GNU General Public License (GPL)",
+        "Natural Language :: English",
+        "Operating System :: OS Independent",
+        "Programming Language :: Python",
+        "Programming Language :: Python :: 2.7",
+        "Topic :: Internet :: WWW/HTTP :: WSGI",
+        "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
+        "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
+        "Topic :: Office/Business :: Groupware",
+        "Topic :: Text Processing :: Markup",
+    ],
 
     packages=find_packages(exclude=['_tests', ]),
 
-    #package_dir={'MoinMoin.translations': 'MoinMoin/translations',
+    # package_dir={'MoinMoin.translations': 'MoinMoin/translations',
     #             'MoinMoin.static': 'MoinMoin/static',
     #             'MoinMoin.themes.modernized': 'MoinMoin/themes/modernized',
     #             'MoinMoin.themes.foobar': 'MoinMoin/themes/foobar',
@@ -69,9 +70,9 @@
     include_package_data=True,
     zip_safe=False,
     dependency_links=[
-        #'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.9.2-dev',
-        #'https://github.com/mitsuhiko/flask/tarball/master#egg=Flask-0.11-dev',
-        #'https://bitbucket.org/thomaswaldmann/whoosh/get/default.tar.gz#egg=Whoosh-2.5.99dev',
+        # 'https://github.com/mitsuhiko/werkzeug/tarball/master#egg=Werkzeug-0.9.2-dev',
+        # 'https://github.com/mitsuhiko/flask/tarball/master#egg=Flask-0.11-dev',
+        # 'https://bitbucket.org/thomaswaldmann/whoosh/get/default.tar.gz#egg=Whoosh-2.5.99dev',
         # use a pre-release and fixed flask-themes 0.2.0 as 0.1.3 does not work for flask 0.8.x:
         'https://bitbucket.org/thomaswaldmann/flask-themes/get/a87399231886.tar.gz#egg=Flask-Themes-0.2.0',
         # use a pre-release emeraldtree (port to 2.6/2.7/3.3):
@@ -114,7 +115,7 @@
     ],
     # optional features and their list of requirements
     extras_require={
-        #'featurename': ["req1", "req2", ],
+        # 'featurename': ["req1", "req2", ],
         'pillow': ["pillow"],  # successor to PIL; used by image get for scaling/rotating/etc.;
                                # requires special libs/header to be installed before it can be compiled successfully
         'ldap': ["python-ldap>=2.0.0"],  # used by ldap auth
--- a/wikiconfig.py	Tue Apr 01 08:13:20 2014 -0700
+++ b/wikiconfig.py	Wed Apr 02 14:55:54 2014 -0700
@@ -84,28 +84,28 @@
 MOINCFG = Config  # Flask only likes uppercase stuff
 # Flask settings - see the flask documentation about their meaning
 SECRET_KEY = 'you need to change this so it is really secret'
-#DEBUG = False # use True for development only, not for public sites!
-#TESTING = False
-#SESSION_COOKIE_NAME = 'session'
-#PERMANENT_SESSION_LIFETIME = timedelta(days=31)
-#USE_X_SENDFILE = False
-#LOGGER_NAME = 'MoinMoin'
-#config for flask-cache:
-#CACHE_TYPE = 'filesystem'
-#CACHE_DIR = '/path/to/flask-cache-dir'
+# DEBUG = False # use True for development only, not for public sites!
+# TESTING = False
+# SESSION_COOKIE_NAME = 'session'
+# PERMANENT_SESSION_LIFETIME = timedelta(days=31)
+# USE_X_SENDFILE = False
+# LOGGER_NAME = 'MoinMoin'
+# config for flask-cache:
+# CACHE_TYPE = 'filesystem'
+# CACHE_DIR = '/path/to/flask-cache-dir'
 
 # DEVELOPERS! Do not add your configuration items here - you could accidentally
 # commit them! Instead, create a wikiconfig_local.py file containing this:
 #
-#from wikiconfig_editme import *
+# from wikiconfig_editme import *
 #
 # In wikiconfig_editme.py (the indirection is needed so that the auto reload
 # mechanism of the builtin server works) you do this:
 #
-#from wikiconfig import *
+# from wikiconfig import *
 #
-#class LocalConfig(Config):
+# class LocalConfig(Config):
 #    configuration_item_1 = 'value1'
 #
-#MOINCFG = LocalConfig
-#DEBUG = True
+# MOINCFG = LocalConfig
+# DEBUG = True