Skip to content

Commit

Permalink
Misc CI warning and error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carreau committed Mar 25, 2021
1 parent 849197d commit a6514bf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion IPython/core/tests/test_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def test_set_matplotlib_formats_kwargs():
ip = get_ipython()
cfg = _get_inline_config()
cfg.print_figure_kwargs.update(dict(foo='bar'))
kwargs = dict(quality=10)
kwargs = dict(dpi=150)
display.set_matplotlib_formats('png', **kwargs)
formatter = ip.display_formatter.formatters['image/png']
f = formatter.lookup_by_type(Figure)
Expand Down
7 changes: 4 additions & 3 deletions IPython/lib/display.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from IPython.core.display import DisplayObject, TextDisplayObject

from typing import Tuple

__all__ = ['Audio', 'IFrame', 'YouTubeVideo', 'VimeoVideo', 'ScribdDocument',
'FileLink', 'FileLinks', 'Code']

Expand Down Expand Up @@ -159,7 +161,7 @@ def _make_wav(data, rate, normalize):
return val

@staticmethod
def _validate_and_normalize_with_numpy(data, normalize):
def _validate_and_normalize_with_numpy(data, normalize) -> Tuple[bytes, int]:
import numpy as np

data = np.array(data, dtype=float)
Expand All @@ -178,8 +180,7 @@ def _validate_and_normalize_with_numpy(data, normalize):
max_abs_value = np.max(np.abs(data))
normalization_factor = Audio._get_normalization_factor(max_abs_value, normalize)
scaled = data / normalization_factor * 32767
return scaled.astype('<h').tostring(), nchan

return scaled.astype("<h").tobytes(), nchan

@staticmethod
def _validate_and_normalize_without_numpy(data, normalize):
Expand Down
8 changes: 5 additions & 3 deletions docs/source/whatsnew/version7.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
============

.. _version 7.22:
=================

IPython 7.22
============


Thanks
Expand All @@ -16,7 +18,7 @@ codebase; they now have triage permissions to the IPython repository and we'll
work toward giving them more permission in the future.

Many thanks to all the contributors to this release you can find all individual
contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/XX>`_.
contributions to this milestone `on github <https://github.com/ipython/ipython/milestone/XX>`__.

Thanks as well to organisations, QuantStack for working on debugger
compatibility for Xeus_python, and the `D. E. Shaw group
Expand Down Expand Up @@ -53,7 +55,7 @@ Thanks
------

Many thanks to all the contributors to this release you can find all individual
contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`_.
contribution to this milestone `on github <https://github.com/ipython/ipython/milestone/83>`__.


.. _version 720:
Expand Down

0 comments on commit a6514bf

Please sign in to comment.