fix lint and docs

This commit is contained in:
nulano 2020-07-23 00:04:16 +02:00
parent 97871205c2
commit e0b53f0014
4 changed files with 3 additions and 5 deletions

View File

@ -1,5 +1,3 @@
import distutils.version
import pytest
from packaging.version import parse as parse_version
from PIL import Image, ImageDraw, ImageFont, features

View File

@ -19,7 +19,7 @@ horizontal alignment, the second character is the vertical alignment.
For example, the default value of ``la`` for horizontal text means left--ascender
aligned text.
When drawing text with :py:meth:`PIL.ImageDraw.Draw.text` with a specific anchor,
When drawing text with :py:meth:`PIL.ImageDraw.ImageDraw.text` with a specific anchor,
text will be placed such that the specified anchor point is at the ``xy`` coordinates.
For example, in the following image, text is ``ms`` (middle--baseline) aligned, with ``xy`` at

View File

@ -392,7 +392,7 @@ Methods
.. note:: For historical reasons this function measures text height from
the ascender line instead of the top, see :ref:`text-anchors`.
If you wish to measure text height from the top, it is recommended
to use :meth:`.FreeTypeFont.getbbox` with `anchor='lt'` instead.
to use :meth:`.FreeTypeFont.getbbox` with ``anchor='lt'`` instead.
:param text: Text to be measured. If it contains any newline characters,

View File

@ -337,7 +337,7 @@ class FreeTypeFont:
.. note:: For historical reasons this function measures text height from
the ascender line instead of the top, see :ref:`text-anchors`.
If you wish to measure text height from the top, it is recommended
to use :meth:`getbbox` with `anchor='lt'` instead.
to use :meth:`getbbox` with ``anchor='lt'`` instead.
:param text: Text to measure.