Replace spaces with tabs and add to pre-commit linting

This commit is contained in:
Hugo 2020-05-01 21:23:39 +03:00
parent a9cd55bc39
commit 94c7af7596
6 changed files with 50 additions and 44 deletions

View File

@ -30,3 +30,9 @@ repos:
hooks: hooks:
- id: check-merge-conflict - id: check-merge-conflict
- id: check-yaml - id: check-yaml
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.1.7
hooks:
- id: remove-tabs
exclude: (Makefile$|\.bat$|\.cmake$|\.eps$|\.fits$|\.opt$)

View File

@ -5310,23 +5310,23 @@ Pre-fork
+ Added keyword options to the "save" method. The following options + Added keyword options to the "save" method. The following options
are currently supported: are currently supported:
format option description Format Option Description
-------------------------------------------------------- --------------------------------------------------------
JPEG optimize minimize output file at the JPEG optimize Minimize output file at the
expense of compression speed. expense of compression speed.
JPEG progressive enable progressive output. the JPEG progressive Enable progressive output.
option value is ignored. The option value is ignored.
JPEG quality set compression quality (1-100). JPEG quality Set compression quality (1-100).
the default value is 75. The default value is 75.
JPEG smooth smooth dithered images. value JPEG smooth Smooth dithered images.
is strength (1-100). default is Value is strength (1-100).
off (0). Default is off (0).
PNG optimize minimize output file at the PNG optimize Minimize output file at the
expense of compression speed. expense of compression speed.
Expect more options in future releases. Also note that Expect more options in future releases. Also note that
file writers silently ignore unknown options. file writers silently ignore unknown options.
@ -5347,31 +5347,31 @@ Pre-fork
+ Various improvements to the sample scripts: + Various improvements to the sample scripts:
"pilconvert" Carries out some extra tricks in order to make "pilconvert" Carries out some extra tricks in order to make
the resulting file as small as possible. the resulting file as small as possible.
"explode" (NEW) Split an image sequence into individual frames. "explode" (NEW) Split an image sequence into individual frames.
"gifmaker" (NEW) Convert a sequence file into a GIF animation. "gifmaker" (NEW) Convert a sequence file into a GIF animation.
Note that the GIF encoder create "uncompressed" GIF Note that the GIF encoder create "uncompressed" GIF
files, so animations created by this script are files, so animations created by this script are
rather large (typically 2-5 times the compressed rather large (typically 2-5 times the compressed
sizes). sizes).
"image2py" (NEW) Convert a single image to a python module. See "image2py" (NEW) Convert a single image to a python module. See
comments in this script for details. comments in this script for details.
"player" If multiple images are given on the command line, "player" If multiple images are given on the command line,
they are interpreted as frames in a sequence. The they are interpreted as frames in a sequence. The
script assumes that they all have the same size. script assumes that they all have the same size.
Also note that this script now can play FLI/FLC Also note that this script now can play FLI/FLC
and GIF animations. and GIF animations.
This player can also execute embedded Python This player can also execute embedded Python
animation applets (ARG format only). animation applets (ARG format only).
"viewer" Transparent images ("P" with transparency property, "viewer" Transparent images ("P" with transparency property,
and "RGBA") are superimposed on the standard Tk back- and "RGBA") are superimposed on the standard Tk back-
ground. ground.
+ Fixed colour argument to "new". For multilayer images, pass a + Fixed colour argument to "new". For multilayer images, pass a
tuple: (Red, Green, Blue), (Red, Green, Blue, Alpha), or (Cyan, tuple: (Red, Green, Blue), (Red, Green, Blue, Alpha), or (Cyan,

View File

@ -4,12 +4,12 @@
# Use SVN to just fetch a single Git subdirectory # Use SVN to just fetch a single Git subdirectory
svn_export() svn_export()
{ {
if [ ! -z $1 ]; then if [ ! -z $1 ]; then
echo "" echo ""
echo "Retrying svn export..." echo "Retrying svn export..."
echo "" echo ""
fi fi
svn export --force https://github.com/python-pillow/pillow-depends/trunk/test_images ../Tests/images svn export --force https://github.com/python-pillow/pillow-depends/trunk/test_images ../Tests/images
} }
svn_export || svn_export retry || svn_export retry || svn_export retry svn_export || svn_export retry || svn_export retry || svn_export retry

View File

@ -179,7 +179,7 @@ complete list, see the table in the :py:mod:`Unpack.c` module. The following
table describes some commonly used **raw modes**: table describes some commonly used **raw modes**:
+-----------+-----------------------------------------------------------------+ +-----------+-----------------------------------------------------------------+
| mode | description | | mode | description |
+===========+=================================================================+ +===========+=================================================================+
| ``1`` | 1-bit bilevel, stored with the leftmost pixel in the most | | ``1`` | 1-bit bilevel, stored with the leftmost pixel in the most |
| | significant bit. 0 means black, 1 means white. | | | significant bit. 0 means black, 1 means white. |
@ -223,7 +223,7 @@ You can use the ``raw`` decoder to read images where data is packed in any
standard machine data type, using one of the following raw modes: standard machine data type, using one of the following raw modes:
============ ======================================= ============ =======================================
mode description mode description
============ ======================================= ============ =======================================
``F`` 32-bit native floating point. ``F`` 32-bit native floating point.
``F;8`` 8-bit unsigned integer. ``F;8`` 8-bit unsigned integer.

View File

@ -58,8 +58,8 @@ Functions
``warnings.simplefilter('ignore', Image.DecompressionBombWarning)``. See also `the logging ``warnings.simplefilter('ignore', Image.DecompressionBombWarning)``. See also `the logging
documentation`_ to have warnings output to the logging facility instead of stderr. documentation`_ to have warnings output to the logging facility instead of stderr.
.. _decompression bombs: https://en.wikipedia.org/wiki/Zip_bomb .. _decompression bombs: https://en.wikipedia.org/wiki/Zip_bomb
.. _the logging documentation: https://docs.python.org/3/library/logging.html#integration-with-the-warnings-module .. _the logging documentation: https://docs.python.org/3/library/logging.html#integration-with-the-warnings-module
Image processing Image processing
^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^

View File

@ -413,10 +413,10 @@ can be easily displayed in a chromaticity diagram, for example).
with :py:attr:`.intent_supported`. with :py:attr:`.intent_supported`.
:param intent: One of ``ImageCms.INTENT_ABSOLUTE_COLORIMETRIC``, :param intent: One of ``ImageCms.INTENT_ABSOLUTE_COLORIMETRIC``,
``ImageCms.INTENT_PERCEPTUAL``, ``ImageCms.INTENT_PERCEPTUAL``,
``ImageCms.INTENT_RELATIVE_COLORIMETRIC`` ``ImageCms.INTENT_RELATIVE_COLORIMETRIC``
and ``ImageCms.INTENT_SATURATION``. and ``ImageCms.INTENT_SATURATION``.
:param direction: One of ``ImageCms.DIRECTION_INPUT``, :param direction: One of ``ImageCms.DIRECTION_INPUT``,
``ImageCms.DIRECTION_OUTPUT`` ``ImageCms.DIRECTION_OUTPUT``
and ``ImageCms.DIRECTION_PROOF`` and ``ImageCms.DIRECTION_PROOF``
:return: Boolean if the intent and direction is supported. :return: Boolean if the intent and direction is supported.