Thomas Waldmann avatar Thomas Waldmann committed 86e998d

pep8 whitespace fixes

Comments (0)

Files changed (7)

MoinMoin/_tests/_test_template.py

     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

MoinMoin/_tests/test_wikiutil.py

 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:_.-')
 
 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:

MoinMoin/converter/mediawiki_in.py

     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]

MoinMoin/items/__init__.py

 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, \

MoinMoin/util/_tests/test_mimetype.py

         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:
 
         # 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'))
         ]
 
 
     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

contrib/pep8/DeleteTrailingSpaces.py

     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
 
 
 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
  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)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.