Show More
@@ -121,6 +121,7 b' from IPython.utils import path as util_path' | |||||
121 | from IPython.utils import py3compat |
|
121 | from IPython.utils import py3compat | |
122 | from IPython.utils.data import uniq_stable |
|
122 | from IPython.utils.data import uniq_stable | |
123 | from IPython.utils.terminal import get_terminal_size |
|
123 | from IPython.utils.terminal import get_terminal_size | |
|
124 | ||||
124 | from logging import info, error, debug |
|
125 | from logging import info, error, debug | |
125 |
|
126 | |||
126 | import IPython.utils.colorable as colorable |
|
127 | import IPython.utils.colorable as colorable | |
@@ -621,16 +622,6 b' class ListTB(TBTools):' | |||||
621 | lines = ''.join(self._format_exception_only(etype, value)) |
|
622 | lines = ''.join(self._format_exception_only(etype, value)) | |
622 | out_list.append(lines) |
|
623 | out_list.append(lines) | |
623 |
|
624 | |||
624 | # Note: this code originally read: |
|
|||
625 |
|
||||
626 | ## for line in lines[:-1]: |
|
|||
627 | ## out_list.append(" "+line) |
|
|||
628 | ## out_list.append(lines[-1]) |
|
|||
629 |
|
||||
630 | # This means it was indenting everything but the last line by a little |
|
|||
631 | # bit. I've disabled this for now, but if we see ugliness somewhere we |
|
|||
632 | # can restore it. |
|
|||
633 |
|
||||
634 | return out_list |
|
625 | return out_list | |
635 |
|
626 | |||
636 | def _format_list(self, extracted_list): |
|
627 | def _format_list(self, extracted_list): | |
@@ -841,13 +832,6 b' class VerboseTB(TBTools):' | |||||
841 | Colors.vName, ColorsNormal) |
|
832 | Colors.vName, ColorsNormal) | |
842 | tpl_name_val = '%%s %s= %%s%s' % (Colors.valEm, ColorsNormal) |
|
833 | tpl_name_val = '%%s %s= %%s%s' % (Colors.valEm, ColorsNormal) | |
843 |
|
834 | |||
844 | tpl_line = '%s%%s%s %%s' % (Colors.lineno, ColorsNormal) |
|
|||
845 | tpl_line_em = '%s%%s%s %%s%s' % (Colors.linenoEm, Colors.line, |
|
|||
846 | ColorsNormal) |
|
|||
847 |
|
||||
848 | abspath = os.path.abspath |
|
|||
849 |
|
||||
850 |
|
||||
851 | if not file: |
|
835 | if not file: | |
852 | file = '?' |
|
836 | file = '?' | |
853 | elif file.startswith(str("<")) and file.endswith(str(">")): |
|
837 | elif file.startswith(str("<")) and file.endswith(str(">")): | |
@@ -875,7 +859,7 b' class VerboseTB(TBTools):' | |||||
875 | call = '' |
|
859 | call = '' | |
876 | else: |
|
860 | else: | |
877 | # Decide whether to include variable details or not |
|
861 | # Decide whether to include variable details or not | |
878 |
var_repr = self.include_vars |
|
862 | var_repr = eqrepr if self.include_vars else nullrepr | |
879 | try: |
|
863 | try: | |
880 | call = tpl_call % (func, inspect.formatargvalues(args, |
|
864 | call = tpl_call % (func, inspect.formatargvalues(args, | |
881 | varargs, varkw, |
|
865 | varargs, varkw, | |
@@ -1041,7 +1025,6 b' class VerboseTB(TBTools):' | |||||
1041 | def format_exception(self, etype, evalue): |
|
1025 | def format_exception(self, etype, evalue): | |
1042 | colors = self.Colors # just a shorthand + quicker name lookup |
|
1026 | colors = self.Colors # just a shorthand + quicker name lookup | |
1043 | colorsnormal = colors.Normal # used a lot |
|
1027 | colorsnormal = colors.Normal # used a lot | |
1044 | indent = ' ' * INDENT_SIZE |
|
|||
1045 | # Get (safely) a string form of the exception info |
|
1028 | # Get (safely) a string form of the exception info | |
1046 | try: |
|
1029 | try: | |
1047 | etype_str, evalue_str = map(str, (etype, evalue)) |
|
1030 | etype_str, evalue_str = map(str, (etype, evalue)) |
General Comments 0
You need to be logged in to leave comments.
Login now