mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-26 00:30:33 +03:00
Merge pull request #4284 from hugovk/doctest-turn-warnings-into-errors
make doccheck: turn warnings into errors
This commit is contained in:
commit
7360e71d64
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
|
@ -83,12 +83,6 @@ jobs:
|
|||
name: errors
|
||||
path: Tests/errors
|
||||
|
||||
- name: Docs
|
||||
if: matrix.python-version == 3.8
|
||||
run: |
|
||||
pip install sphinx-rtd-theme
|
||||
make doccheck
|
||||
|
||||
- name: After success
|
||||
if: success()
|
||||
run: |
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
set -e
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python-tk\
|
||||
sudo apt-get -qq install libfreetype6-dev liblcms2-dev python3-tk\
|
||||
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
|
||||
cmake imagemagick libharfbuzz-dev libfribidi-dev
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ clean:
|
|||
-rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
$(SPHINXBUILD) -b html -W --keep-going $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
|
|
|
@ -341,7 +341,7 @@ Or for Python 3::
|
|||
Prerequisites are installed on **Ubuntu 16.04 LTS** with::
|
||||
|
||||
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
|
||||
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk \
|
||||
libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python3-tk \
|
||||
libharfbuzz-dev libfribidi-dev
|
||||
|
||||
Then see ``depends/install_raqm.sh`` to install libraqm.
|
||||
|
|
|
@ -2181,12 +2181,14 @@ class Image:
|
|||
|
||||
It may also be an :py:class:`~PIL.Image.ImageTransformHandler`
|
||||
object::
|
||||
|
||||
class Example(Image.ImageTransformHandler):
|
||||
def transform(size, method, data, resample, fill=1):
|
||||
# Return result
|
||||
|
||||
It may also be an object with a :py:meth:`~method.getdata` method
|
||||
that returns a tuple supplying new **method** and **data** values::
|
||||
|
||||
class Example(object):
|
||||
def getdata(self):
|
||||
method = Image.EXTENT
|
||||
|
|
|
@ -234,6 +234,7 @@ def pad(image, size, method=Image.BICUBIC, color=None, centering=(0.5, 0.5)):
|
|||
:param color: The background color of the padded image.
|
||||
:param centering: Control the position of the original image within the
|
||||
padded version.
|
||||
|
||||
(0.5, 0.5) will keep the image centered
|
||||
(0, 0) will keep the image aligned to the top left
|
||||
(1, 1) will keep the image aligned to the bottom
|
||||
|
|
Loading…
Reference in New Issue
Block a user