summaryrefslogtreecommitdiff
path: root/django/utils/regex_helper.py
diff options
context:
space:
mode:
authorRay Ashman Jr <ray.ashman.jr@gmail.com>2013-11-02 19:53:29 -0400
committerRay Ashman Jr <ray.ashman.jr@gmail.com>2013-11-02 19:53:29 -0400
commite2ae8b048e7198428f696375b8bdcd89e90002d1 (patch)
tree5788bd3c2a074e5c5c9f354db2e6e7ef1cbce2ad /django/utils/regex_helper.py
parent3bc0d46a840f17dce561daca8a6b8690b2cf5d0a (diff)
Correct flake8 E302 violations
Diffstat (limited to 'django/utils/regex_helper.py')
-rw-r--r--django/utils/regex_helper.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/django/utils/regex_helper.py b/django/utils/regex_helper.py
index c8390cc7eb..199b4ea87d 100644
--- a/django/utils/regex_helper.py
+++ b/django/utils/regex_helper.py
@@ -202,6 +202,7 @@ def normalize(pattern):
return list(zip(*flatten_result(result)))
+
def next_char(input_iter):
"""
An iterator that yields the next character from "pattern_iter", respecting
@@ -222,6 +223,7 @@ def next_char(input_iter):
continue
yield representative, True
+
def walk_to_end(ch, input_iter):
"""
The iterator is currently inside a capturing group. We want to walk to the
@@ -242,6 +244,7 @@ def walk_to_end(ch, input_iter):
return
nesting -= 1
+
def get_quantifier(ch, input_iter):
"""
Parse a quantifier from the input, where "ch" is the first character in the
@@ -278,6 +281,7 @@ def get_quantifier(ch, input_iter):
ch = None
return int(values[0]), ch
+
def contains(source, inst):
"""
Returns True if the "source" contains an instance of "inst". False,
@@ -291,6 +295,7 @@ def contains(source, inst):
return True
return False
+
def flatten_result(source):
"""
Turns the given source sequence into a list of reg-exp possibilities and