From fa00e866ccf10f177cb126fc40add44176b853e4 2021-11-25 00:52:13 From: Matthias Bussonnier Date: 2021-11-25 00:52:13 Subject: [PATCH] Merge pull request #13249 from Carreau/misc-docs Misc docs --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index afb8a6c..356a1e5 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -177,7 +177,13 @@ else: # may have trouble processing. MATCHES_LIMIT = 500 -_deprecation_readline_sentinel = object() + +class Sentinel: + def __repr__(self): + return "" + + +_deprecation_readline_sentinel = Sentinel() class ProvisionalCompleterWarning(FutureWarning): diff --git a/IPython/core/interactiveshell.py b/IPython/core/interactiveshell.py index 34cdaab..a4e7b5c 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2894,7 +2894,7 @@ class InteractiveShell(SingletonConfigurable): result: bool Whether the code needs to be run with a coroutine runner or not - .. versionadded: 7.0 + .. versionadded:: 7.0 """ if not self.autoawait: return False @@ -2959,7 +2959,7 @@ class InteractiveShell(SingletonConfigurable): ------- result : :class:`ExecutionResult` - .. versionadded: 7.0 + .. versionadded:: 7.0 """ info = ExecutionInfo( raw_cell, store_history, silent, shell_futures) diff --git a/IPython/core/pylabtools.py b/IPython/core/pylabtools.py index 36b7276..711ee75 100644 --- a/IPython/core/pylabtools.py +++ b/IPython/core/pylabtools.py @@ -119,7 +119,7 @@ def print_figure(fig, fmt="png", bbox_inches="tight", base64=False, **kwargs): If `base64` is True, return base64-encoded str instead of raw bytes for binary-encoded image formats - .. versionadded: 7.29 + .. versionadded:: 7.29 base64 argument """ # When there's an empty figure, we shouldn't return anything, otherwise we @@ -162,7 +162,7 @@ def retina_figure(fig, base64=False, **kwargs): If `base64` is True, return base64-encoded str instead of raw bytes for binary-encoded image formats - .. versionadded: 7.29 + .. versionadded:: 7.29 base64 argument """ pngdata = print_figure(fig, fmt="retina", base64=False, **kwargs) @@ -399,7 +399,7 @@ def import_pylab(user_ns, import_all=True): def configure_inline_support(shell, backend): """ - .. deprecated: 7.23 + .. deprecated:: 7.23 use `matplotlib_inline.backend_inline.configure_inline_support()` diff --git a/IPython/utils/text.py b/IPython/utils/text.py index c25869a..a1754d2 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -593,6 +593,9 @@ class DollarFormatter(FullEvalFormatter): # Re-yield the {foo} style pattern yield (txt + literal_txt[continue_from:], field_name, format_spec, conversion) + def __repr__(self): + return "" + #----------------------------------------------------------------------------- # Utils to columnize a list of string #-----------------------------------------------------------------------------