From d0041c52082f022ae5bd7deaea91a3b9e4764838 2021-11-25 00:52:23 From: Matthias Bussonnier Date: 2021-11-25 00:52:23 Subject: [PATCH] Backport PR #13249: Misc docs --- diff --git a/IPython/core/completer.py b/IPython/core/completer.py index c493fa3..e4d3995 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -166,7 +166,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 6bb2aa6..835dc8d 100644 --- a/IPython/core/interactiveshell.py +++ b/IPython/core/interactiveshell.py @@ -2981,7 +2981,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 @@ -3046,7 +3046,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 eda368c..c9c8e14 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 72a87c4..256fdab 100644 --- a/IPython/utils/text.py +++ b/IPython/utils/text.py @@ -597,6 +597,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 #-----------------------------------------------------------------------------