From 77f8db7b41e7e23ea698c815958e31b5801f58bf Mon Sep 17 00:00:00 2001 From: Waylan Limberg Date: Wed, 18 Feb 2015 19:05:50 -0500 Subject: No binary operators at begining of line. Apparently this is a new requirement of flake8. That's the thing about using tox. Every test run reinstalls all dependencies so an updated dependency might instroduce new errors. I could specify a specific version, but I like staying current. --- markdown/__init__.py | 4 ++-- markdown/blockprocessors.py | 8 ++++---- markdown/inlinepatterns.py | 12 ++++++------ markdown/preprocessors.py | 7 ++----- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/markdown/__init__.py b/markdown/__init__.py index 9aa3432..107f702 100644 --- a/markdown/__init__.py +++ b/markdown/__init__.py @@ -234,8 +234,8 @@ class Markdown(object): ) # For backward compat (until deprecation) # check that this is an extension. - if ('.' not in ext_name and not (hasattr(module, 'makeExtension') - or (class_name and hasattr(module, class_name)))): + if ('.' not in ext_name and not (hasattr(module, 'makeExtension') or + (class_name and hasattr(module, class_name)))): # We have a name conflict # eg: extensions=['tables'] and PyTables is installed raise ImportError diff --git a/markdown/blockprocessors.py b/markdown/blockprocessors.py index a516fb4..29db022 100644 --- a/markdown/blockprocessors.py +++ b/markdown/blockprocessors.py @@ -231,8 +231,8 @@ class CodeBlockProcessor(BlockProcessor): sibling = self.lastChild(parent) block = blocks.pop(0) theRest = '' - if (sibling is not None and sibling.tag == "pre" - and len(sibling) and sibling[0].tag == "code"): + if (sibling is not None and sibling.tag == "pre" and + len(sibling) and sibling[0].tag == "code"): # The previous block was a code block. As blank lines do not start # new code blocks, append this block to the previous, adding back # linebreaks removed from the split into a list. @@ -517,8 +517,8 @@ class EmptyBlockProcessor(BlockProcessor): # Add remaining lines to master blocks for later. blocks.insert(0, theRest) sibling = self.lastChild(parent) - if (sibling is not None and sibling.tag == 'pre' - and len(sibling) and sibling[0].tag == 'code'): + if (sibling is not None and sibling.tag == 'pre' and + len(sibling) and sibling[0].tag == 'code'): # Last block is a codeblock. Append to preserve whitespace. sibling[0].text = util.AtomicString( '%s%s' % (sibling[0].text, filler) diff --git a/markdown/inlinepatterns.py b/markdown/inlinepatterns.py index 27690bf..95d358d 100644 --- a/markdown/inlinepatterns.py +++ b/markdown/inlinepatterns.py @@ -94,10 +94,10 @@ The actual regular expressions for patterns NOBRACKET = r'[^\]\[]*' BRK = ( - r'\[(' - + (NOBRACKET + r'(\[')*6 - + (NOBRACKET + r'\])*')*6 - + NOBRACKET + r')\]' + r'\[(' + + (NOBRACKET + r'(\[')*6 + + (NOBRACKET + r'\])*')*6 + + NOBRACKET + r')\]' ) NOIMG = r'(?