diff --git a/IPython/__init__.py b/IPython/__init__.py index bafd105..e930dfc 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -56,6 +56,8 @@ from .core.interactiveshell import InteractiveShell from .utils.sysinfo import sys_info from .utils.frame import extract_module_locals +__all__ = ["start_ipython", "embed", "start_kernel", "embed_kernel"] + # Release data __author__ = '%s <%s>' % (release.author, release.author_email) __license__ = release.license diff --git a/IPython/terminal/embed.py b/IPython/terminal/embed.py index 85f89e0..ce5ee01 100644 --- a/IPython/terminal/embed.py +++ b/IPython/terminal/embed.py @@ -350,7 +350,7 @@ class InteractiveShellEmbed(TerminalInteractiveShell): def embed(*, header="", compile_flags=None, **kwargs): """Call this to embed IPython at the current point in your program. - The first invocation of this will create an :class:`InteractiveShellEmbed` + The first invocation of this will create a :class:`terminal.embed.InteractiveShellEmbed` instance and then call it. Consecutive calls just call the already created instance. @@ -375,10 +375,10 @@ def embed(*, header="", compile_flags=None, **kwargs): header : str Optional header string to print at startup. compile_flags - Passed to the `compile_flags` parameter of :py:meth:`InteractiveShellEmbed.mainloop()`, - which is called when the :class:`InteractiveShellEmbed` instance is called. + Passed to the `compile_flags` parameter of :py:meth:`terminal.embed.InteractiveShellEmbed.mainloop()`, + which is called when the :class:`terminal.embed.InteractiveShellEmbed` instance is called. **kwargs : various, optional - Any other kwargs will be passed to the :class:`InteractiveShellEmbed` constructor. + Any other kwargs will be passed to the :class:`terminal.embed.InteractiveShellEmbed` constructor. Full customization can be done by passing a traitlets :class:`Config` in as the `config` argument (see :ref:`configure_start_ipython` and :ref:`terminal_options`). """ diff --git a/docs/autogen_api.py b/docs/autogen_api.py index d2fdfae..0011900 100755 --- a/docs/autogen_api.py +++ b/docs/autogen_api.py @@ -66,10 +66,13 @@ if __name__ == '__main__': # them as part of the public API. They must have __all__ defined. The # non-API modules they import from should be excluded by the skip patterns # above. - docwriter.names_from__all__.update({ - 'IPython.display', - }) - + docwriter.names_from__all__.update( + { + "IPython", + "IPython.display", + } + ) + # Now, generate the outputs docwriter.write_api_docs(outdir) # Write index with .txt extension - we can include it, but Sphinx won't try