From 5474b2c7d46543e918adeeeddbef4374eb5102fe Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 19 Dec 2020 17:55:54 -0800 Subject: [PATCH] Update some doc code blocks to the 'pycon' lexer These code blocks represent Python console sessions, not Python source code. The pycon lexer understands the ">>>" prompt and output (e.g. a traceback). --- docs/releasenotes/7.1.1.rst | 2 +- docs/releasenotes/7.1.2.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/releasenotes/7.1.1.rst b/docs/releasenotes/7.1.1.rst index 4c33adf8e..2169e6a05 100644 --- a/docs/releasenotes/7.1.1.rst +++ b/docs/releasenotes/7.1.1.rst @@ -7,7 +7,7 @@ Fix regression seeking PNG files This fixes a regression introduced in 7.1.0 when adding support for APNG files when calling ``seek`` and ``tell``: -.. code-block:: python +.. code-block:: pycon >>> from PIL import Image >>> with Image.open("Tests/images/hopper.png") as im: diff --git a/docs/releasenotes/7.1.2.rst b/docs/releasenotes/7.1.2.rst index c9d0d54eb..b12d84e33 100644 --- a/docs/releasenotes/7.1.2.rst +++ b/docs/releasenotes/7.1.2.rst @@ -9,7 +9,7 @@ This fixes a regression introduced in 7.1.0 when adding support for APNG files. When calling ``seek(n)`` on a regular PNG where ``n > 0``, it failed to raise an ``EOFError`` as it should have done, resulting in: -.. code-block:: python +.. code-block:: pycon AttributeError: 'NoneType' object has no attribute 'read'