Skip to content

Commit dc9ff86

Browse files
authored
Merge pull request #4050 from hugovk/fix-rst-backticks
Use double backticks in RST
2 parents 929c817 + f792ab6 commit dc9ff86

File tree

11 files changed

+49
-39
lines changed

11 files changed

+49
-39
lines changed

CHANGES.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Changelog (Pillow)
8888
- Updated TIFF tile descriptors to match current decoding functionality #3795
8989
[dmnisson]
9090

91-
- Added an `image.entropy()` method (second revision) #3608
91+
- Added an ``image.entropy()`` method (second revision) #3608
9292
[fish2000]
9393

9494
- Pass the correct types to PyArg_ParseTuple #3880
@@ -724,7 +724,7 @@ Changelog (Pillow)
724724
- Enable background colour parameter on rotate #3057
725725
[storesource]
726726

727-
- Remove unnecessary `#if 1` directive #3072
727+
- Remove unnecessary ``#if 1`` directive #3072
728728
[jdufresne]
729729

730730
- Remove unused Python class, Path #3070
@@ -1261,7 +1261,7 @@ Changelog (Pillow)
12611261
- Add decompression bomb check to Image.crop #2410
12621262
[wiredfool]
12631263

1264-
- ImageFile: Ensure that the `err_code` variable is initialized in case of exception. #2363
1264+
- ImageFile: Ensure that the ``err_code`` variable is initialized in case of exception. #2363
12651265
[alexkiro]
12661266

12671267
- Tiff: Support append_images for saving multipage TIFFs #2406
@@ -1498,7 +1498,7 @@ Changelog (Pillow)
14981498
- Removed PIL 1.0 era TK readme that concerns Windows 95/NT #2360
14991499
[wiredfool]
15001500

1501-
- Prevent `nose -v` printing docstrings #2369
1501+
- Prevent ``nose -v`` printing docstrings #2369
15021502
[hugovk]
15031503

15041504
- Replaced absolute PIL imports with relative imports #2349
@@ -1943,7 +1943,7 @@ Changelog (Pillow)
19431943
- Changed depends/install_*.sh urls to point to github pillow-depends repo #1983
19441944
[wiredfool]
19451945

1946-
- Allow ICC profile from `encoderinfo` while saving PNGs #1909
1946+
- Allow ICC profile from ``encoderinfo`` while saving PNGs #1909
19471947
[homm]
19481948

19491949
- Fix integer overflow on ILP32 systems (32-bit Linux). #1975
@@ -2386,7 +2386,7 @@ Changelog (Pillow)
23862386
- Added PDF multipage saving #1445
23872387
[radarhere]
23882388

2389-
- Removed deprecated code, Image.tostring, Image.fromstring, Image.offset, ImageDraw.setink, ImageDraw.setfill, ImageFileIO, ImageFont.FreeTypeFont and ImageFont.truetype `file` kwarg, ImagePalette private _make functions, ImageWin.fromstring and ImageWin.tostring #1343
2389+
- Removed deprecated code, Image.tostring, Image.fromstring, Image.offset, ImageDraw.setink, ImageDraw.setfill, ImageFileIO, ImageFont.FreeTypeFont and ImageFont.truetype ``file`` kwarg, ImagePalette private _make functions, ImageWin.fromstring and ImageWin.tostring #1343
23902390
[radarhere]
23912391

23922392
- Load more broken images #1428
@@ -2878,7 +2878,7 @@ Changelog (Pillow)
28782878
- Doc cleanup
28792879
[wiredfool]
28802880

2881-
- Fix `ImageStat` docs #796
2881+
- Fix ``ImageStat`` docs #796
28822882
[akx]
28832883

28842884
- Added docs for ExifTags #794
@@ -3315,7 +3315,7 @@ Changelog (Pillow)
33153315
- Add RGBA support to ImageColor #309
33163316
[yoavweiss]
33173317

3318-
- Test for `str`, not `"utf-8"` #306 (fixes #304)
3318+
- Test for ``str``, not ``"utf-8"`` #306 (fixes #304)
33193319
[mjpieters]
33203320

33213321
- Fix missing import os in _util.py #303
@@ -3421,7 +3421,7 @@ Changelog (Pillow)
34213421

34223422
- Partial work to add a wrapper for WebPGetFeatures to correctly support #220 (fixes #204)
34233423

3424-
- Significant performance improvement of `alpha_composite` function #156
3424+
- Significant performance improvement of ``alpha_composite`` function #156
34253425
[homm]
34263426

34273427
- Support explicitly disabling features via --disable-* options #240

docs/handbook/image-file-formats.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,12 @@ The :py:meth:`~PIL.Image.Image.save` method supports the following options:
389389
image will be saved without tiling.
390390

391391
**quality_mode**
392-
Either `"rates"` or `"dB"` depending on the units you want to use to
392+
Either ``"rates"`` or ``"dB"`` depending on the units you want to use to
393393
specify image quality.
394394

395395
**quality_layers**
396396
A sequence of numbers, each of which represents either an approximate size
397-
reduction (if quality mode is `"rates"`) or a signal to noise ratio value
397+
reduction (if quality mode is ``"rates"``) or a signal to noise ratio value
398398
in decibels. If not specified, defaults to a single layer of full quality.
399399

400400
**num_resolutions**
@@ -811,10 +811,10 @@ Saving sequences
811811

812812
Support for animated WebP files will only be enabled if the system WebP
813813
library is v0.5.0 or later. You can check webp animation support at
814-
runtime by calling `features.check("webp_anim")`.
814+
runtime by calling ``features.check("webp_anim")``.
815815

816816
When calling :py:meth:`~PIL.Image.Image.save`, the following options
817-
are available when the `save_all` argument is present and true.
817+
are available when the ``save_all`` argument is present and true.
818818

819819
**append_images**
820820
A list of images to append as additional frames. Each of the

docs/handbook/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ Transposing an image
247247
out = im.transpose(Image.ROTATE_270)
248248

249249
``transpose(ROTATE)`` operations can also be performed identically with
250-
:py:meth:`~PIL.Image.Image.rotate` operations, provided the `expand` flag is
250+
:py:meth:`~PIL.Image.Image.rotate` operations, provided the ``expand`` flag is
251251
true, to provide for the same changes to the image's size.
252252

253253
A more general form of image transformations can be carried out via the

docs/reference/Image.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Functions
5252
.. warning::
5353
To protect against potential DOS attacks caused by "`decompression bombs`_" (i.e. malicious files
5454
which decompress into a huge amount of data and are designed to crash or cause disruption by using up
55-
a lot of memory), Pillow will issue a `DecompressionBombWarning` if the image is over a certain
55+
a lot of memory), Pillow will issue a ``DecompressionBombWarning`` if the image is over a certain
5656
limit. If desired, the warning can be turned into an error with
5757
``warnings.simplefilter('error', Image.DecompressionBombWarning)`` or suppressed entirely with
5858
``warnings.simplefilter('ignore', Image.DecompressionBombWarning)``. See also `the logging
@@ -262,10 +262,10 @@ Instances of the :py:class:`Image` class have the following attributes:
262262
.. py:attribute:: filename
263263
264264
The filename or path of the source file. Only images created with the
265-
factory function `open` have a filename attribute. If the input is a
265+
factory function ``open`` have a filename attribute. If the input is a
266266
file like object, the filename attribute is set to an empty string.
267267

268-
:type: :py:class: `string`
268+
:type: :py:class:`string`
269269

270270
.. py:attribute:: format
271271

docs/reference/ImageCms.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ can be easily displayed in a chromaticity diagram, for example).
3333
.. py:attribute:: version
3434
3535
The version number of the ICC standard that this profile follows
36-
(e.g. `2.0`).
36+
(e.g. ``2.0``).
3737

3838
:type: :py:class:`float`
3939

4040
.. py:attribute:: icc_version
4141
42-
Same as `version`, but in encoded format (see 7.2.4 of ICC.1:2010).
42+
Same as ``version``, but in encoded format (see 7.2.4 of ICC.1:2010).
4343

4444
.. py:attribute:: device_class
4545

docs/reference/ImagePath.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ vector data. Path objects can be passed to the methods on the
5353
Converts the path to a Python list [(x, y), …].
5454

5555
:param flat: By default, this function returns a list of 2-tuples
56-
[(x, y), ...]. If this argument is `True`, it
56+
[(x, y), ...]. If this argument is ``True``, it
5757
returns a flat list [x, y, ...] instead.
5858
:return: A list of coordinates. See **flat**.
5959

docs/releasenotes/2.7.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Image resizing filters
2727
----------------------
2828

2929
Image resizing methods :py:meth:`~PIL.Image.Image.resize` and
30-
:py:meth:`~PIL.Image.Image.thumbnail` take a `resample` argument, which tells
30+
:py:meth:`~PIL.Image.Image.thumbnail` take a ``resample`` argument, which tells
3131
which filter should be used for resampling. Possible values are:
3232
:py:attr:`PIL.Image.NEAREST`, :py:attr:`PIL.Image.BILINEAR`,
3333
:py:attr:`PIL.Image.BICUBIC` and :py:attr:`PIL.Image.ANTIALIAS`.

docs/releasenotes/2.8.0.rst

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,28 @@
44
Open HTTP response objects with Image.open
55
------------------------------------------
66

7-
HTTP response objects returned from `urllib2.urlopen(url)` or `requests.get(url, stream=True).raw` are 'file-like' but do not support `.seek()` operations. As a result PIL was unable to open them as images, requiring a wrap in `cStringIO` or `BytesIO`.
7+
HTTP response objects returned from ``urllib2.urlopen(url)`` or
8+
``requests.get(url, stream=True).raw`` are 'file-like' but do not support ``.seek()``
9+
operations. As a result PIL was unable to open them as images, requiring a wrap in
10+
``cStringIO`` or ``BytesIO``.
811

9-
Now new functionality has been added to `Image.open()` by way of an `.seek(0)` check and catch on exception `AttributeError` or `io.UnsupportedOperation`. If this is caught we attempt to wrap the object using `io.BytesIO` (which will only work on buffer-file-like objects).
12+
Now new functionality has been added to ``Image.open()`` by way of an ``.seek(0)`` check and
13+
catch on exception ``AttributeError`` or ``io.UnsupportedOperation``. If this is caught we
14+
attempt to wrap the object using ``io.BytesIO`` (which will only work on buffer-file-like
15+
objects).
1016

11-
This allows opening of files using both `urllib2` and `requests`, e.g.::
17+
This allows opening of files using both ``urllib2`` and ``requests``, e.g.::
1218

1319
Image.open(urllib2.urlopen(url))
1420
Image.open(requests.get(url, stream=True).raw)
1521

16-
If the response uses content-encoding (compression, either gzip or deflate) then this will fail as both the urllib2 and requests raw file object will produce compressed data in that case. Using Content-Encoding on images is rather non-sensical as most images are already compressed, but it can still happen.
22+
If the response uses content-encoding (compression, either gzip or deflate) then this
23+
will fail as both the urllib2 and requests raw file object will produce compressed data
24+
in that case. Using Content-Encoding on images is rather non-sensical as most images are
25+
already compressed, but it can still happen.
1726

18-
For requests the work-around is to set the decode_content attribute on the raw object to True::
27+
For requests the work-around is to set the decode_content attribute on the raw object to
28+
True::
1929

2030
response = requests.get(url, stream=True)
2131
response.raw.decode_content = True

docs/releasenotes/3.0.0.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
Saving Multipage Images
66
-----------------------
77

8-
There is now support for saving multipage images in the `GIF` and
9-
`PDF` formats. To enable this functionality, pass in `save_all=True`
8+
There is now support for saving multipage images in the ``GIF`` and
9+
``PDF`` formats. To enable this functionality, pass in ``save_all=True``
1010
as a keyword argument to the save::
1111

1212
im.save('test.pdf', save_all=True)
@@ -37,7 +37,7 @@ have been removed in this release::
3737
ImageDraw.setink()
3838
ImageDraw.setfill()
3939
The ImageFileIO module
40-
The ImageFont.FreeTypeFont and ImageFont.truetype `file` keyword arg
40+
The ImageFont.FreeTypeFont and ImageFont.truetype ``file`` keyword arg
4141
The ImagePalette private _make functions
4242
ImageWin.fromstring()
4343
ImageWin.tostring()

docs/releasenotes/3.1.0.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
ImageDraw arc, chord and pieslice can now use floats
66
----------------------------------------------------
77

8-
There is no longer a need to ensure that the start and end arguments for `arc`,
9-
`chord` and `pieslice` are integers.
8+
There is no longer a need to ensure that the start and end arguments for ``arc``,
9+
``chord`` and ``pieslice`` are integers.
1010

1111
Note that these numbers are not simply rounded internally, but are actually
1212
utilised in the drawing process.

winbuild/build.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ virtualenv as well, reducing the number of packages that we need to
3737
install.)
3838

3939
Download the rest of the Pythons by opening a command window, changing
40-
to the `winbuild` directory, and running `python
41-
get_pythons.py`.
40+
to the ``winbuild`` directory, and running ``python
41+
get_pythons.py``.
4242

4343
UNDONE -- gpg verify the signatures (note that we can download from
4444
https)
@@ -65,8 +65,8 @@ Dependencies
6565
------------
6666

6767
The script 'build_dep.py' downloads and builds the dependencies. Open
68-
a command window, change directory into `winbuild` and run `python
69-
build_dep.py`.
68+
a command window, change directory into ``winbuild`` and run ``python
69+
build_dep.py``.
7070

7171
This will download libjpeg, libtiff, libz, and freetype. It will then
7272
compile 32 and 64-bit versions of the libraries, with both versions of
@@ -78,16 +78,16 @@ UNDONE -- webp, jpeg2k not recognized
7878
Building Pillow
7979
---------------
8080

81-
Once the dependencies are built, run `python build.py --clean` to
81+
Once the dependencies are built, run ``python build.py --clean`` to
8282
build and install Pillow in virtualenvs for each Python
83-
build. `build.py --wheel` will build wheels instead of
83+
build. ``build.py --wheel`` will build wheels instead of
8484
installing into virtualenvs.
8585

8686
UNDONE -- suppressed output, what about failures.
8787

8888
Testing Pillow
8989
--------------
9090

91-
Build and install Pillow, then run `python test.py` from the
92-
`winbuild` directory.
91+
Build and install Pillow, then run ``python test.py`` from the
92+
``winbuild`` directory.
9393

0 commit comments

Comments
 (0)