Removed domain references when referring to hypothetical code

This commit is contained in:
Andrew Murray 2020-07-14 22:20:44 +10:00
parent 470bf71e7a
commit 45564fe89d
2 changed files with 8 additions and 15 deletions

View File

@ -115,17 +115,10 @@ nitpicky = True
# if present. Example entries would be ('py:func', 'int') or # if present. Example entries would be ('py:func', 'int') or
# ('envvar', 'LD_LIBRARY_PATH'). # ('envvar', 'LD_LIBRARY_PATH').
nitpick_ignore = [ nitpick_ignore = [
("py:meth", "_open"),
("py:attr", "tile"),
("py:meth", "CDC.GetHandleAttrib"),
("py:meth", "PIL.Image.Image.convert2byte"),
("py:attr", "PIL.Image.Image.tag"), ("py:attr", "PIL.Image.Image.tag"),
("py:attr", "PIL.Image.Image.tag_v2"), ("py:attr", "PIL.Image.Image.tag_v2"),
("py:attr", "PIL.Image.Image.tile"), ("py:attr", "PIL.Image.Image.tile"),
("py:data", "PIL.Image.MAX_IMAGE_PIXELS"), ("py:data", "PIL.Image.MAX_IMAGE_PIXELS"),
("py:func", "PIL.ImageMath.convert"),
("py:func", "PIL.ImageMath.float"),
("py:func", "PIL.ImageMath.int"),
("py:attr", "PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype"), ("py:attr", "PIL.TiffImagePlugin.ImageFileDirectory_v2.tagtype"),
] ]

View File

@ -28,16 +28,16 @@ Pillow decodes files in two stages:
An image plugin should contain a format handler derived from the An image plugin should contain a format handler derived from the
:py:class:`PIL.ImageFile.ImageFile` base class. This class should :py:class:`PIL.ImageFile.ImageFile` base class. This class should
provide an :py:meth:`_open` method, which reads the file header and provide an ``_open`` method, which reads the file header and
sets up at least the :py:attr:`~PIL.Image.Image.mode` and sets up at least the :py:attr:`~PIL.Image.Image.mode` and
:py:attr:`~PIL.Image.Image.size` attributes. To be able to load the :py:attr:`~PIL.Image.Image.size` attributes. To be able to load the
file, the method must also create a list of :py:attr:`tile` file, the method must also create a list of ``tile`` descriptors,
descriptors, which contain a decoder name, extents of the tile, and which contain a decoder name, extents of the tile, and
any decoder-specific data. The format handler class must be explicitly any decoder-specific data. The format handler class must be explicitly
registered, via a call to the :py:mod:`~PIL.Image` module. registered, via a call to the :py:mod:`~PIL.Image` module.
.. note:: For performance reasons, it is important that the .. note:: For performance reasons, it is important that the
:py:meth:`_open` method quickly rejects files that do not have the ``_open`` method quickly rejects files that do not have the
appropriate contents. appropriate contents.
Example Example
@ -103,10 +103,10 @@ Note that the image plugin must be explicitly registered using
:py:func:`PIL.Image.register_open`. Although not required, it is also a good :py:func:`PIL.Image.register_open`. Although not required, it is also a good
idea to register any extensions used by this format. idea to register any extensions used by this format.
The :py:attr:`tile` attribute The ``tile`` attribute
----------------------------- ----------------------
To be able to read the file as well as just identifying it, the :py:attr:`tile` To be able to read the file as well as just identifying it, the ``tile``
attribute must also be set. This attribute consists of a list of tile attribute must also be set. This attribute consists of a list of tile
descriptors, where each descriptor specifies how data should be loaded to a descriptors, where each descriptor specifies how data should be loaded to a
given region in the image. In most cases, only a single descriptor is used, given region in the image. In most cases, only a single descriptor is used,
@ -134,7 +134,7 @@ The fields are used as follows:
decoder specified by the first field in the tile descriptor tuple. If the decoder specified by the first field in the tile descriptor tuple. If the
decoder doesnt need any parameters, use :data:`None` for this field. decoder doesnt need any parameters, use :data:`None` for this field.
Note that the :py:attr:`tile` attribute contains a list of tile descriptors, Note that the ``tile`` attribute contains a list of tile descriptors,
not just a single descriptor. not just a single descriptor.
Decoders Decoders