@@ -195,12 +195,12 @@ def __init__(self, profile="default", hist_file="", **traits):
195195 Parameters
196196 ----------
197197 profile : str
198- The name of the profile from which to open history.
198+ The name of the profile from which to open history.
199199 hist_file : str
200- Path to an SQLite history database stored by IPython. If specified,
201- hist_file overrides profile.
200+ Path to an SQLite history database stored by IPython. If specified,
201+ hist_file overrides profile.
202202 config : :class:`~traitlets.config.loader.Config`
203- Config object. hist_file can also be set through this.
203+ Config object. hist_file can also be set through this.
204204 """
205205 # We need a pointer back to the shell for various tasks.
206206 super (HistoryAccessor , self ).__init__ (** traits )
@@ -227,7 +227,7 @@ def _get_hist_file_name(self, profile='default'):
227227 Parameters
228228 ----------
229229 profile : str
230- The name of a profile which has a history file.
230+ The name of a profile which has a history file.
231231 """
232232 return Path (locate_profile (profile )) / "history.sqlite"
233233
@@ -271,13 +271,13 @@ def _run_sql(self, sql, params, raw=True, output=False, latest=False):
271271 Parameters
272272 ----------
273273 sql : str
274- Any filtering expressions to go after SELECT ... FROM ...
274+ Any filtering expressions to go after SELECT ... FROM ...
275275 params : tuple
276- Parameters passed to the SQL query (to replace "?")
276+ Parameters passed to the SQL query (to replace "?")
277277 raw, output : bool
278- See :meth:`get_range`
278+ See :meth:`get_range`
279279 latest : bool
280- Select rows with max (session, line)
280+ Select rows with max (session, line)
281281
282282 Returns
283283 -------
@@ -305,23 +305,21 @@ def get_session_info(self, session):
305305
306306 Parameters
307307 ----------
308-
309308 session : int
310309 Session number to retrieve.
311310
312311 Returns
313312 -------
314-
315313 session_id : int
316- Session ID number
314+ Session ID number
317315 start : datetime
318- Timestamp for the start of the session.
316+ Timestamp for the start of the session.
319317 end : datetime
320- Timestamp for the end of the session, or None if IPython crashed.
318+ Timestamp for the end of the session, or None if IPython crashed.
321319 num_cmds : int
322- Number of commands run, or None if IPython crashed.
320+ Number of commands run, or None if IPython crashed.
323321 remark : unicode
324- A manually set description.
322+ A manually set description.
325323 """
326324 query = "SELECT * from sessions where session == ?"
327325 return self .db .execute (query , (session ,)).fetchone ()
@@ -343,13 +341,13 @@ def get_tail(self, n=10, raw=True, output=False, include_latest=False):
343341 Parameters
344342 ----------
345343 n : int
346- The number of lines to get
344+ The number of lines to get
347345 raw, output : bool
348- See :meth:`get_range`
346+ See :meth:`get_range`
349347 include_latest : bool
350- If False (default), n+1 lines are fetched, and the latest one
351- is discarded. This is intended to be used where the function
352- is called by a user command, which it should not return.
348+ If False (default), n+1 lines are fetched, and the latest one
349+ is discarded. This is intended to be used where the function
350+ is called by a user command, which it should not return.
353351
354352 Returns
355353 -------
@@ -373,16 +371,16 @@ def search(self, pattern="*", raw=True, search_raw=True,
373371 Parameters
374372 ----------
375373 pattern : str
376- The wildcarded pattern to match when searching
374+ The wildcarded pattern to match when searching
377375 search_raw : bool
378- If True, search the raw input, otherwise, the parsed input
376+ If True, search the raw input, otherwise, the parsed input
379377 raw, output : bool
380- See :meth:`get_range`
378+ See :meth:`get_range`
381379 n : None or int
382- If an integer is given, it defines the limit of
383- returned entries.
380+ If an integer is given, it defines the limit of
381+ returned entries.
384382 unique : bool
385- When it is true, return only unique entries.
383+ When it is true, return only unique entries.
386384
387385 Returns
388386 -------
@@ -430,9 +428,9 @@ def get_range(self, session, start=1, stop=None, raw=True,output=False):
430428 Returns
431429 -------
432430 entries
433- An iterator over the desired lines. Each line is a 3-tuple, either
434- (session, line, input) if output is False, or
435- (session, line, (input, output)) if output is True.
431+ An iterator over the desired lines. Each line is a 3-tuple, either
432+ (session, line, input) if output is False, or
433+ (session, line, (input, output)) if output is True.
436434 """
437435 if stop :
438436 lineclause = "line >= ? AND line < ?"
@@ -451,13 +449,13 @@ def get_range_by_str(self, rangestr, raw=True, output=False):
451449 Parameters
452450 ----------
453451 rangestr : str
454- A string specifying ranges, e.g. "5 ~2/1-4". If empty string is used,
455- this will return everything from current session's history.
452+ A string specifying ranges, e.g. "5 ~2/1-4". If empty string is used,
453+ this will return everything from current session's history.
456454
457- See the documentation of :func:`%history` for the full details.
455+ See the documentation of :func:`%history` for the full details.
458456
459457 raw, output : bool
460- As :meth:`get_range`
458+ As :meth:`get_range`
461459
462460 Returns
463461 -------
@@ -605,24 +603,22 @@ def get_session_info(self, session=0):
605603
606604 Parameters
607605 ----------
608-
609606 session : int
610607 Session number to retrieve. The current session is 0, and negative
611608 numbers count back from current session, so -1 is the previous session.
612609
613610 Returns
614611 -------
615-
616612 session_id : int
617- Session ID number
613+ Session ID number
618614 start : datetime
619- Timestamp for the start of the session.
615+ Timestamp for the start of the session.
620616 end : datetime
621- Timestamp for the end of the session, or None if IPython crashed.
617+ Timestamp for the end of the session, or None if IPython crashed.
622618 num_cmds : int
623- Number of commands run, or None if IPython crashed.
619+ Number of commands run, or None if IPython crashed.
624620 remark : unicode
625- A manually set description.
621+ A manually set description.
626622 """
627623 if session <= 0 :
628624 session += self .session_number
@@ -673,9 +669,9 @@ def get_range(self, session=0, start=1, stop=None, raw=True,output=False):
673669 Returns
674670 -------
675671 entries
676- An iterator over the desired lines. Each line is a 3-tuple, either
677- (session, line, input) if output is False, or
678- (session, line, (input, output)) if output is True.
672+ An iterator over the desired lines. Each line is a 3-tuple, either
673+ (session, line, input) if output is False, or
674+ (session, line, (input, output)) if output is True.
679675 """
680676 if session <= 0 :
681677 session += self .session_number
@@ -694,14 +690,12 @@ def store_inputs(self, line_num, source, source_raw=None):
694690 Parameters
695691 ----------
696692 line_num : int
697- The prompt number of this input.
698-
693+ The prompt number of this input.
699694 source : str
700- Python input.
701-
695+ Python input.
702696 source_raw : str, optional
703- If given, this is the raw input without any IPython transformations
704- applied to it. If not given, ``source`` is used.
697+ If given, this is the raw input without any IPython transformations
698+ applied to it. If not given, ``source`` is used.
705699 """
706700 if source_raw is None :
707701 source_raw = source
@@ -745,7 +739,7 @@ def store_output(self, line_num):
745739 Parameters
746740 ----------
747741 line_num : int
748- The line number from which to save outputs
742+ The line number from which to save outputs
749743 """
750744 if (not self .db_log_output ) or (line_num not in self .output_hist_reprs ):
751745 return
0 commit comments