Make comments and docstrings comply with PEP8
This commit is contained in:
@@ -61,8 +61,9 @@ class ToText(Tokenizer):
|
||||
thisPar = []
|
||||
for tType, tText, tFormat, tAlign in self.theTokens:
|
||||
|
||||
# First check if we have a comment or plain text, as they need some
|
||||
# extra replacing before we proceed to wrapping and final formatting.
|
||||
# First check if we have a comment or plain text, as they
|
||||
# need some extra replacing before we proceed to wrapping
|
||||
# and final formatting.
|
||||
if tType == self.T_COMMENT:
|
||||
tText = "[%s]" % tText
|
||||
|
||||
@@ -74,7 +75,8 @@ class ToText(Tokenizer):
|
||||
|
||||
tLen = len(tText)
|
||||
|
||||
# The text can now be word wrapped, if we have requested this and it's needed.
|
||||
# The text can now be word wrapped, if we have requested
|
||||
# this and it's needed.
|
||||
if tAlign == self.A_CENTRE:
|
||||
if self.wordWrap > 0:
|
||||
if tLen > self.wordWrap:
|
||||
@@ -88,8 +90,9 @@ class ToText(Tokenizer):
|
||||
if self.wordWrap > 0 and tLen > self.wordWrap:
|
||||
tText = tWrap.fill(tText)
|
||||
|
||||
# Then the text can receive final formatting before we append it to the results.
|
||||
# We also store text lines in a buffer and merge them only when we find an empty line,
|
||||
# Then the text can receive final formatting before we
|
||||
# append it to the results. We also store text lines in a
|
||||
# buffer and merge them only when we find an empty line,
|
||||
# indicating a new paragraph.
|
||||
if tType == self.T_EMPTY:
|
||||
if len(thisPar) > 0:
|
||||
|
||||
Reference in New Issue
Block a user