aboutsummaryrefslogtreecommitdiffstats
path: root/mako/exceptions.py
diff options
context:
space:
mode:
authorBenjamin Trofatter <bentrofatter@gmail.com>2012-03-24 18:43:15 -0500
committerBenjamin Trofatter <bentrofatter@gmail.com>2012-03-24 18:43:15 -0500
commit4b395f679029b8375063e4408ca08a7a860cb99c (patch)
treef408b56e4fcfe12a47be5d2200f3a659db8ef097 /mako/exceptions.py
parentf7983ce165440bdaeac4d544f393fc76d8ce4cf0 (diff)
downloadexternal_python_mako-4b395f679029b8375063e4408ca08a7a860cb99c.tar.gz
external_python_mako-4b395f679029b8375063e4408ca08a7a860cb99c.tar.bz2
external_python_mako-4b395f679029b8375063e4408ca08a7a860cb99c.zip
Brought all modules into PEP 8 width compliance
Diffstat (limited to 'mako/exceptions.py')
-rw-r--r--mako/exceptions.py21
1 files changed, 14 insertions, 7 deletions
diff --git a/mako/exceptions.py b/mako/exceptions.py
index abb866e..9bc706d 100644
--- a/mako/exceptions.py
+++ b/mako/exceptions.py
@@ -24,7 +24,8 @@ def _format_filepos(lineno, pos, filename):
class CompileException(MakoException):
def __init__(self, message, source, lineno, pos, filename):
- MakoException.__init__(self, message + _format_filepos(lineno, pos, filename))
+ MakoException.__init__(self,
+ message + _format_filepos(lineno, pos, filename))
self.lineno =lineno
self.pos = pos
self.filename = filename
@@ -32,7 +33,8 @@ class CompileException(MakoException):
class SyntaxException(MakoException):
def __init__(self, message, source, lineno, pos, filename):
- MakoException.__init__(self, message + _format_filepos(lineno, pos, filename))
+ MakoException.__init__(self,
+ message + _format_filepos(lineno, pos, filename))
self.lineno =lineno
self.pos = pos
self.filename = filename
@@ -232,7 +234,8 @@ ${tback.errorname}: ${tback.message}
try:
- from mako.ext.pygmentplugin import syntax_highlight, pygments_html_formatter
+ from mako.ext.pygmentplugin import syntax_highlight,\
+ pygments_html_formatter
except ImportError:
from mako.filters import html_escape
pygments_html_formatter = None
@@ -254,7 +257,8 @@ def html_error_template():
import mako.template
return mako.template.Template(r"""
<%!
- from mako.exceptions import RichTraceback, syntax_highlight, pygments_html_formatter
+ from mako.exceptions import RichTraceback, syntax_highlight,\
+ pygments_html_formatter
%>
<%page args="full=True, css=True, error=None, traceback=None"/>
% if full:
@@ -268,7 +272,8 @@ def html_error_template():
.stacktrace { margin:5px 5px 5px 5px; }
.highlight { padding:0px 10px 0px 10px; background-color:#9F9FDF; }
.nonhighlight { padding:0px; background-color:#DFDFDF; }
- .sample { padding:10px; margin:10px 10px 10px 10px; font-family:monospace; }
+ .sample { padding:10px; margin:10px 10px 10px 10px;
+ font-family:monospace; }
.sampleline { padding:0px 10px 0px 10px; }
.sourceline { margin:5px 5px 10px 5px; font-family:monospace;}
.location { font-size:80%; }
@@ -281,7 +286,8 @@ def html_error_template():
pre { margin: 0; }
.syntax-highlighted { padding: 0 10px; }
.syntax-highlightedtable { border-spacing: 1px; }
- .nonhighlight { border-top: 1px solid #DFDFDF; border-bottom: 1px solid #DFDFDF; }
+ .nonhighlight { border-top: 1px solid #DFDFDF;
+ border-bottom: 1px solid #DFDFDF; }
.stacktrace .nonhighlight { margin: 5px 15px 10px; }
.sourceline { margin: 0 0; font-family:monospace; }
.code { background-color: #F8F8F8; width: 100%; }
@@ -352,4 +358,5 @@ def html_error_template():
</body>
</html>
% endif
-""", output_encoding=sys.getdefaultencoding(), encoding_errors='htmlentityreplace')
+""", output_encoding=sys.getdefaultencoding(),
+ encoding_errors='htmlentityreplace')