Commit 08315f6
committed
DOC: Don't show traceback for :okexcept:
- use local modified ipython_directive to add optional no_traceback
argument to :ok_except: which prevents the (sometimes long) traceback
from being printed (default is no argument, i.e. the traceback is
printed) and enable the @okexcept pseudodecorator so that it can be
applied to individual instructions instead of the whole block
- use local modified ipython_console_highlighting to enable syntax
highlighting of exceptions without a traceback
- fix pylint warnings for ipython_directive.py and simplify
"".join(["."] * x) to "." * x
The "# noqa: E999" after "@okexcept no_traceback" is necessary to
prevent flake8-rst from complaining about syntax errors as it
interprets the pseudodecorator as a real python decorator.
Items 1 and 2 can be reverted if github.com/ipython/ipython/pull/13751
gets merged upstream.1 parent 3c72d6f commit 08315f6
File tree
8 files changed
+1455
-40
lines changed- doc
- source
- user_guide
- sphinxext/ipython_sphinxext
8 files changed
+1455
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
359 | 360 | | |
360 | | - | |
361 | | - | |
362 | | - | |
363 | | - | |
| 361 | + | |
364 | 362 | | |
365 | 363 | | |
366 | 364 | | |
367 | 365 | | |
| 366 | + | |
368 | 367 | | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
| 368 | + | |
373 | 369 | | |
374 | 370 | | |
375 | 371 | | |
| |||
572 | 568 | | |
573 | 569 | | |
574 | 570 | | |
| 571 | + | |
575 | 572 | | |
576 | | - | |
577 | | - | |
578 | | - | |
579 | | - | |
| 573 | + | |
580 | 574 | | |
581 | 575 | | |
582 | 576 | | |
| |||
586 | 580 | | |
587 | 581 | | |
588 | 582 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
| 583 | + | |
| 584 | + | |
593 | 585 | | |
594 | 586 | | |
595 | 587 | | |
| |||
768 | 760 | | |
769 | 761 | | |
770 | 762 | | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
| 763 | + | |
| 764 | + | |
775 | 765 | | |
776 | 766 | | |
777 | 767 | | |
778 | 768 | | |
779 | 769 | | |
780 | 770 | | |
781 | 771 | | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
| 772 | + | |
| 773 | + | |
786 | 774 | | |
787 | 775 | | |
788 | 776 | | |
| |||
1067 | 1055 | | |
1068 | 1056 | | |
1069 | 1057 | | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
1073 | | - | |
| 1058 | + | |
| 1059 | + | |
1074 | 1060 | | |
1075 | 1061 | | |
1076 | | - | |
1077 | | - | |
1078 | | - | |
1079 | | - | |
| 1062 | + | |
| 1063 | + | |
1080 | 1064 | | |
1081 | 1065 | | |
1082 | 1066 | | |
| |||
1098 | 1082 | | |
1099 | 1083 | | |
1100 | 1084 | | |
1101 | | - | |
1102 | | - | |
1103 | | - | |
1104 | | - | |
1105 | | - | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
1106 | 1088 | | |
1107 | 1089 | | |
1108 | 1090 | | |
| |||
Whitespace-only changes.
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
0 commit comments