##// END OF EJS Templates
some docstring reformatting and fixing
Matthias Bussonnier -
Show More
@@ -32,6 +32,8 b' from IPython.utils.py3compat import input'
32 32
33 33 from IPython.core.release import __version__ as version
34 34
35 from typing import Optional
36
35 37 #-----------------------------------------------------------------------------
36 38 # Code
37 39 #-----------------------------------------------------------------------------
@@ -95,8 +97,15 b' class CrashHandler(object):'
95 97 message_template = _default_message_template
96 98 section_sep = '\n\n'+'*'*75+'\n\n'
97 99
98 def __init__(self, app, contact_name=None, contact_email=None,
99 bug_tracker=None, show_crash_traceback=True, call_pdb=False):
100 def __init__(
101 self,
102 app,
103 contact_name: Optional[str] = None,
104 contact_email: Optional[str] = None,
105 bug_tracker: Optional[str] = None,
106 show_crash_traceback: bool = True,
107 call_pdb: bool = False,
108 ):
100 109 """Create a new crash handler
101 110
102 111 Parameters
@@ -113,10 +122,15 b' class CrashHandler(object):'
113 122 show_crash_traceback : bool
114 123 If false, don't print the crash traceback on stderr, only generate
115 124 the on-disk report
116 Non-argument instance attributes
125 call_pdb
126 Whether to call pdb on crash
127
128 Attributes
129 ----------
117 130 These instances contain some non-argument attributes which allow for
118 131 further customization of the crash handler's behavior. Please see the
119 132 source for further details.
133
120 134 """
121 135 self.crash_report_fname = "Crash_report_%s.txt" % app.name
122 136 self.app = app
1 NO CONTENT: modified file
@@ -115,13 +115,10 b' def record_magic(dct, magic_kind, magic_name, func):'
115 115 ----------
116 116 dct : dict
117 117 A dictionary with 'line' and 'cell' subdicts.
118
119 118 magic_kind : str
120 119 Kind of magic to be stored.
121
122 120 magic_name : str
123 121 Key to store the magic as.
124
125 122 func : function
126 123 Callable object to store.
127 124 """
@@ -387,7 +384,7 b' class MagicsManager(Configurable):'
387 384
388 385 Parameters
389 386 ----------
390 magic_objects : one or more classes or instances
387 *magic_objects : one or more classes or instances
391 388 """
392 389 # Start by validating them to ensure they have all had their magic
393 390 # methods registered at the instance level
@@ -423,10 +420,8 b' class MagicsManager(Configurable):'
423 420 ----------
424 421 func : callable
425 422 Function to be registered as a magic.
426
427 423 magic_kind : str
428 424 Kind of magic, one of 'line', 'cell' or 'line_cell'
429
430 425 magic_name : optional str
431 426 If given, the name the magic will have in the IPython namespace. By
432 427 default, the name of the function itself is used.
@@ -451,10 +446,8 b' class MagicsManager(Configurable):'
451 446 ----------
452 447 alias_name : str
453 448 The name of the magic to be registered.
454
455 449 magic_name : str
456 450 The name of an existing magic.
457
458 451 magic_kind : str
459 452 Kind of magic, one of 'line' or 'cell'
460 453 """
@@ -580,21 +573,16 b' class Magics(Configurable):'
580 573
581 574 Parameters
582 575 ----------
583
584 576 arg_str : str
585 577 The arguments to parse.
586
587 578 opt_str : str
588 579 The options specification.
589
590 580 mode : str, default 'string'
591 581 If given as 'list', the argument string is returned as a list (split
592 582 on whitespace) instead of a string.
593
594 583 list_all : bool, default False
595 584 Put all option values in lists. Normally only options
596 585 appearing more than once are put in a list.
597
598 586 posix : bool, default True
599 587 Whether to split the input line in POSIX mode or not, as per the
600 588 conventions outlined in the :mod:`shlex` module from the standard
1 NO CONTENT: modified file
@@ -18,7 +18,6 b' def page(strng, start=0, screen_lines=0, pager_cmd=None):'
18 18 ----------
19 19 strng : str or mime-dict
20 20 Text to page, or a mime-type keyed dict of already formatted data.
21
22 21 start : int
23 22 Starting line at which to place the display.
24 23 """
@@ -241,7 +241,7 b' def select_figure_formats(shell, formats, **kwargs):'
241 241 """Select figure formats for the inline backend.
242 242
243 243 Parameters
244 ==========
244 ----------
245 245 shell : InteractiveShell
246 246 The main IPython instance.
247 247 formats : str or set
@@ -408,7 +408,6 b' def configure_inline_support(shell, backend):'
408 408 Parameters
409 409 ----------
410 410 shell : InteractiveShell instance
411
412 411 backend : matplotlib backend
413 412 """
414 413 warnings.warn(
@@ -556,7 +556,7 b' class ListTB(TBTools):'
556 556 Parameters
557 557 ----------
558 558 etype : exception type
559 evalue : exception value
559 value : exception value
560 560 """
561 561 return ListTB.structured_traceback(self, etype, value)
562 562
General Comments 0
You need to be logged in to leave comments. Login now