Skip to content

Commit

Permalink
fix lint and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nulano committed Jul 22, 2020
1 parent 9787120 commit e0b53f0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Tests/test_imagefontctl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import distutils.version

import pytest
from packaging.version import parse as parse_version
from PIL import Image, ImageDraw, ImageFont, features
Expand Down
2 changes: 1 addition & 1 deletion docs/handbook/text-anchors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/ImageDraw.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFont.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def getsize(
.. 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.
Expand Down

0 comments on commit e0b53f0

Please sign in to comment.