Skip to content

Commit 2d0d528

Browse files
committed
fix lint and docs
1 parent a6fc928 commit 2d0d528

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

Tests/test_imagefontctl.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import distutils.version
2-
31
import pytest
42
from packaging.version import parse as parse_version
53

docs/handbook/text-anchors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ horizontal alignment, the second character is the vertical alignment.
1919
For example, the default value of ``la`` for horizontal text means left--ascender
2020
aligned text.
2121

22-
When drawing text with :py:meth:`PIL.ImageDraw.Draw.text` with a specific anchor,
22+
When drawing text with :py:meth:`PIL.ImageDraw.ImageDraw.text` with a specific anchor,
2323
text will be placed such that the specified anchor point is at the ``xy`` coordinates.
2424

2525
For example, in the following image, text is ``ms`` (middle--baseline) aligned, with ``xy`` at

docs/reference/ImageDraw.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ Methods
392392
.. note:: For historical reasons this function measures text height from
393393
the ascender line instead of the top, see :ref:`text-anchors`.
394394
If you wish to measure text height from the top, it is recommended
395-
to use :meth:`.FreeTypeFont.getbbox` with `anchor='lt'` instead.
395+
to use :meth:`.FreeTypeFont.getbbox` with ``anchor='lt'`` instead.
396396

397397

398398
:param text: Text to be measured. If it contains any newline characters,

src/PIL/ImageFont.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ def getsize(
337337
.. note:: For historical reasons this function measures text height from
338338
the ascender line instead of the top, see :ref:`text-anchors`.
339339
If you wish to measure text height from the top, it is recommended
340-
to use :meth:`getbbox` with `anchor='lt'` instead.
340+
to use :meth:`getbbox` with ``anchor='lt'`` instead.
341341
342342
:param text: Text to measure.
343343

0 commit comments

Comments
 (0)