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
|
name: errors
|
||||||
path: Tests/errors
|
path: Tests/errors
|
||||||
|
|
||||||
- name: Docs
|
|
||||||
if: matrix.python-version == 3.8
|
|
||||||
run: |
|
|
||||||
pip install sphinx-rtd-theme
|
|
||||||
make doccheck
|
|
||||||
|
|
||||||
- name: After success
|
- name: After success
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
sudo apt-get update
|
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\
|
ghostscript libffi-dev libjpeg-turbo-progs libopenjp2-7-dev\
|
||||||
cmake imagemagick libharfbuzz-dev libfribidi-dev
|
cmake imagemagick libharfbuzz-dev libfribidi-dev
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ clean:
|
||||||
-rm -rf $(BUILDDIR)/*
|
-rm -rf $(BUILDDIR)/*
|
||||||
|
|
||||||
html:
|
html:
|
||||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
$(SPHINXBUILD) -b html -W --keep-going $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
@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::
|
Prerequisites are installed on **Ubuntu 16.04 LTS** with::
|
||||||
|
|
||||||
sudo apt-get install libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev \
|
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
|
libharfbuzz-dev libfribidi-dev
|
||||||
|
|
||||||
Then see ``depends/install_raqm.sh`` to install libraqm.
|
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`
|
It may also be an :py:class:`~PIL.Image.ImageTransformHandler`
|
||||||
object::
|
object::
|
||||||
|
|
||||||
class Example(Image.ImageTransformHandler):
|
class Example(Image.ImageTransformHandler):
|
||||||
def transform(size, method, data, resample, fill=1):
|
def transform(size, method, data, resample, fill=1):
|
||||||
# Return result
|
# Return result
|
||||||
|
|
||||||
It may also be an object with a :py:meth:`~method.getdata` method
|
It may also be an object with a :py:meth:`~method.getdata` method
|
||||||
that returns a tuple supplying new **method** and **data** values::
|
that returns a tuple supplying new **method** and **data** values::
|
||||||
|
|
||||||
class Example(object):
|
class Example(object):
|
||||||
def getdata(self):
|
def getdata(self):
|
||||||
method = Image.EXTENT
|
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 color: The background color of the padded image.
|
||||||
:param centering: Control the position of the original image within the
|
:param centering: Control the position of the original image within the
|
||||||
padded version.
|
padded version.
|
||||||
|
|
||||||
(0.5, 0.5) will keep the image centered
|
(0.5, 0.5) will keep the image centered
|
||||||
(0, 0) will keep the image aligned to the top left
|
(0, 0) will keep the image aligned to the top left
|
||||||
(1, 1) will keep the image aligned to the bottom
|
(1, 1) will keep the image aligned to the bottom
|
||||||
|
|
Loading…
Reference in New Issue
Block a user