Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc fix doc #12824

Merged
merged 1 commit into from
Feb 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 15 additions & 5 deletions IPython/core/completer.py
Expand Up @@ -201,7 +201,9 @@ def provisionalcompleter(action='ignore'):

>>> completer.do_experimental_things() # raises.

.. note:: Unstable
.. note::

Unstable

By using this context manager you agree that the API in use may change
without warning, and that you won't complain if they do so.
Expand Down Expand Up @@ -356,7 +358,9 @@ class Completion:
"""
Completion object used and return by IPython completers.

.. warning:: Unstable
.. warning::

Unstable

This function is unstable, API may change without warning.
It will also raise unless use in proper context manager.
Expand Down Expand Up @@ -419,7 +423,9 @@ def _deduplicate_completions(text: str, completions: _IC)-> _IC:
"""
Deduplicate a set of completions.

.. warning:: Unstable
.. warning::

Unstable

This function is unstable, API may change without warning.

Expand Down Expand Up @@ -459,7 +465,9 @@ def rectify_completions(text: str, completions: _IC, *, _debug=False)->_IC:
"""
Rectify a set of completions to all have the same ``start`` and ``end``

.. warning:: Unstable
.. warning::

Unstable

This function is unstable, API may change without warning.
It will also raise unless use in proper context manager.
Expand Down Expand Up @@ -1837,7 +1845,9 @@ def completions(self, text: str, offset: int)->Iterator[Completion]:
"""
Returns an iterator over the possible completions

.. warning:: Unstable
.. warning::

Unstable

This function is unstable, API may change without warning.
It will also raise unless use in proper context manager.
Expand Down
16 changes: 8 additions & 8 deletions IPython/core/display.py
Expand Up @@ -1043,19 +1043,19 @@ def __init__(self, data=None, url=None, filename=None, embed=False,
----------
data : unicode, str or bytes
The raw video data or a URL or filename to load the data from.
Raw data will require passing `embed=True`.
Raw data will require passing ``embed=True``.
url : unicode
A URL for the video. If you specify `url=`,
A URL for the video. If you specify ``url=``,
the image data will not be embedded.
filename : unicode
Path to a local file containing the video.
Will be interpreted as a local URL unless `embed=True`.
Will be interpreted as a local URL unless ``embed=True``.
embed : bool
Should the video be embedded using a data URI (True) or be
loaded using a <video> tag (False).

Since videos are large, embedding them should be avoided, if possible.
You must confirm embedding as your intention by passing `embed=True`.
You must confirm embedding as your intention by passing ``embed=True``.

Local files can be displayed with URLs without embedding the content, via::

Expand All @@ -1070,10 +1070,10 @@ def __init__(self, data=None, url=None, filename=None, embed=False,
Height in pixels to which to constrain the video in html.
If not supplied, defaults to the height of the video.
html_attributes : str
Attributes for the HTML `<video>` block.
Default: `"controls"` to get video controls.
Other examples: `"controls muted"` for muted video with controls,
`"loop autoplay"` for looping autoplaying video without controls.
Attributes for the HTML ``<video>`` block.
Default: ``"controls"`` to get video controls.
Other examples: ``"controls muted"`` for muted video with controls,
``"loop autoplay"`` for looping autoplaying video without controls.

Examples
--------
Expand Down