changeset 1396:86e998d808e7

pep8 whitespace fixes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 24 Jun 2012 14:42:26 +0200
parents 249b7900fe28
children 4ac437141bbe
files MoinMoin/_tests/_test_template.py MoinMoin/_tests/test_wikiutil.py MoinMoin/converter/mediawiki_in.py MoinMoin/items/__init__.py MoinMoin/util/_tests/test_mimetype.py contrib/pep8/DeleteTrailingSpaces.py setup.cfg
diffstat 7 files changed, 34 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/_test_template.py	Sun Jun 24 14:23:46 2012 +0200
+++ b/MoinMoin/_tests/_test_template.py	Sun Jun 24 14:42:26 2012 +0200
@@ -40,8 +40,8 @@
     can add a test by adding another line to this list
     """
     _tests = (
-        # description,  test,            expected
-        ('Line break',  '<<BR>>',        '<br>'),
+        # description, test, expected
+        ('Line break', '<<BR>>', '<br>'),
     )
 
     from MoinMoin._tests import wikiconfig
--- a/MoinMoin/_tests/test_wikiutil.py	Sun Jun 24 14:23:46 2012 +0200
+++ b/MoinMoin/_tests/test_wikiutil.py	Sun Jun 24 14:42:26 2012 +0200
@@ -31,12 +31,12 @@
 class TestAnchorNames(object):
     def test_anchor_name_encoding(self):
         tests = [
-            # text                    expected output
-            (u'\xf6\xf6ll\xdf\xdf',   'A.2BAPYA9g-ll.2BAN8A3w-'),
-            (u'level 2',              'level_2'),
-            (u'level_2',              'level_2'),
-            (u'',                     'A'),
-            (u'123',                  'A123'),
+            # text, expected output
+            (u'\xf6\xf6ll\xdf\xdf', 'A.2BAPYA9g-ll.2BAN8A3w-'),
+            (u'level 2', 'level_2'),
+            (u'level_2', 'level_2'),
+            (u'', 'A'),
+            (u'123', 'A123'),
             # make sure that a valid anchor is not modified:
             (u'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_.-',
              u'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_.-')
@@ -224,12 +224,12 @@
 
 def testfile_headers():
     test_headers = [
-                #test_file               #content_type
-                ('imagefile.gif',       'image/gif'),
-                ('testfile.txt',        'text/plain'),
-                ('pdffile.pdf',         'application/pdf'),
-                ('docfile.doc',         'application/msword'),
-                (None,                  'application/octet-stream')
+                #test_file, content_type
+                ('imagefile.gif', 'image/gif'),
+                ('testfile.txt', 'text/plain'),
+                ('pdffile.pdf', 'application/pdf'),
+                ('docfile.doc', 'application/msword'),
+                (None, 'application/octet-stream')
                 ]
 
     for test_file, content_type in test_headers:
--- a/MoinMoin/converter/mediawiki_in.py	Sun Jun 24 14:23:46 2012 +0200
+++ b/MoinMoin/converter/mediawiki_in.py	Sun Jun 24 14:42:26 2012 +0200
@@ -814,7 +814,7 @@
     class Mediawiki_preprocessor(object):
 
         class Preprocessor_tag(object):
-            def __init__(self, name='', text='', tag='',  status=True):
+            def __init__(self, name='', text='', tag='', status=True):
                 self.tag_name = name
                 self.tag = tag
                 self.text = [text]
--- a/MoinMoin/items/__init__.py	Sun Jun 24 14:23:46 2012 +0200
+++ b/MoinMoin/items/__init__.py	Sun Jun 24 14:42:26 2012 +0200
@@ -70,7 +70,7 @@
 from MoinMoin.util.interwiki import url_for_item
 from MoinMoin.storage.error import NoSuchItemError, NoSuchRevisionError, StorageError
 from MoinMoin.config import NAME, NAME_OLD, NAME_EXACT, WIKINAME, MTIME, REVERTED_TO, ACL, \
-                            IS_SYSITEM, SYSITEM_VERSION,  USERGROUP, SOMEDICT, \
+                            IS_SYSITEM, SYSITEM_VERSION, USERGROUP, SOMEDICT, \
                             CONTENTTYPE, SIZE, LANGUAGE, ITEMLINKS, ITEMTRANSCLUSIONS, \
                             TAGS, ACTION, ADDRESS, HOSTNAME, USERID, EXTRA, COMMENT, \
                             HASH_ALGORITHM, CONTENTTYPE_GROUPS, ITEMID, REVID, DATAID, \
--- a/MoinMoin/util/_tests/test_mimetype.py	Sun Jun 24 14:23:46 2012 +0200
+++ b/MoinMoin/util/_tests/test_mimetype.py	Sun Jun 24 14:42:26 2012 +0200
@@ -16,11 +16,11 @@
         MimeType_obj = mimetype.MimeType(filename='test_file.jpg')
         # format in config.parser_text_mimetype
         test = [
-        #test_format    # test_mimetype
-        ('html',        ('text', 'html')),
-        ('css',         ('text', 'css')),
-        ('python',      ('text', 'python')),
-        ('latex',       ('text', 'latex'))
+        #test_format, test_mimetype
+        ('html', ('text', 'html')),
+        ('css', ('text', 'css')),
+        ('python', ('text', 'python')),
+        ('latex', ('text', 'latex'))
         ]
 
         for test_format, test_mimetype in test:
@@ -29,9 +29,9 @@
 
         # format not in config.parser_text_mimetype
         test = [
-        # test_format   # test_mimetype
-        ('wiki',        ('text', 'x.moin.wiki')),
-        ('irc',         ('text', 'irssi')),
+        # test_format, test_mimetype
+        ('wiki', ('text', 'x.moin.wiki')),
+        ('irc', ('text', 'irssi')),
         ('test_random', ('text', 'x-test_random'))
         ]
 
@@ -42,14 +42,14 @@
 
     def test_mime_type(self):
         test = [
-        # test_extension     # test_major/minor
-        ('.mpeg',            'video/mpeg'),
-        ('.pdf',             'application/pdf'),
-        ('.txt',             'text/plain'),
-        ('.jpeg',            'image/jpeg'),
-        ('.png',             'image/png'),
-        ('.svg',             'image/svg+xml'),
-        ('',                 'application/octet-stream')
+        # test_extension, test_major/minor
+        ('.mpeg', 'video/mpeg'),
+        ('.pdf', 'application/pdf'),
+        ('.txt', 'text/plain'),
+        ('.jpeg', 'image/jpeg'),
+        ('.png', 'image/png'),
+        ('.svg', 'image/svg+xml'),
+        ('', 'application/octet-stream')
         ]
 
         # when mimestr is None
--- a/contrib/pep8/DeleteTrailingSpaces.py	Sun Jun 24 14:23:46 2012 +0200
+++ b/contrib/pep8/DeleteTrailingSpaces.py	Sun Jun 24 14:42:26 2012 +0200
@@ -27,7 +27,7 @@
     level2_dirs = ".hg contrib dlc docs env moin.egg-info wiki".split()
     for dir in level2_dirs:
         ignore_dirs.append((starting_dir, dir))
-    ignore_dirs.append((starting_dir + os.sep + "MoinMoin",  "translations"))
+    ignore_dirs.append((starting_dir + os.sep + "MoinMoin", "translations"))
     return ignore_dirs
 
 
--- a/setup.cfg	Sun Jun 24 14:23:46 2012 +0200
+++ b/setup.cfg	Sun Jun 24 14:42:26 2012 +0200
@@ -45,7 +45,6 @@
 pep8ignore =
  *.py E121 E122 E123 E124 E125 E126 E127 E128  # continuation line indentation
  *.py E225  # missing whitespace around operator
- *.py E241  # whitespace around comma (we have some "tabular" formatting in the tests)
  *.py E261  # less than 2 blanks before inline comment
  *.py E301 E302  # separate toplevel definitions with 2 empty lines, method defs inside class by 1 empty line
  *.py E401  # imports on separate lines
@@ -55,4 +54,5 @@
  wikiconfig_*.py ALL  # local stuff, not in the repo
  docs/conf.py ALL  # sphinx stuff, automatically generated, don't check this
  MoinMoin/util/md5crypt.py ALL  # 3rd party stuff, don't check this
+ MoinMoin/util/_tests/test_paramparser.py E241 # whitespace around comma (we have some "tabular" formatting there)