diff --git a/CHANGES.rst b/CHANGES.rst index 96a5aa5c7..afe5cb1b9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -106,7 +106,7 @@ Changelog (Pillow) - Removed docs/BUILDME script #1924 [radarhere] -- Moved comments to docstrings #1926 +- Moved comments to docstrings #1926 [hugovk] - Include Python.h before wchar.h so _GNU_SOURCE is set consistently #1906 @@ -128,7 +128,7 @@ Changelog (Pillow) [wiredfool] - Skip test when icc profile is not available, fixes #1887 - [doko42] + [doko42] - Make deprecated functions raise NotImplementedError instead of Exception. #1862, #1890 [daniel-leicht, radarhere] @@ -344,7 +344,7 @@ Changelog (Pillow) 3.1.1 (2016-02-04) ------------------ -- Fixed an integer overflow in Resample.c causing writes in the Python heap. +- Fixed an integer overflow in Resample.c causing writes in the Python heap. [nedwill] - Fixed a buffer overflow in PcdDecode.c causing a segfault when opening PhotoCD files. CVE-2016-2533 diff --git a/Makefile b/Makefile index e4ead2923..db1056dfa 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ co: git checkout -t $$i ; \ done -coverage: +coverage: coverage erase coverage run --parallel-mode --include=PIL/* selftest.py nosetests --with-cov --cov='PIL/' --cov-report=html Tests/test_*.py @@ -28,8 +28,8 @@ doc: doccheck: $(MAKE) -C docs html -# Don't make our test rely on the links in the docs being up every single build. -# We don't control them. But do check, and update them to the target of their redirectes. +# Don't make our test rely on the links in the docs being up every single build. +# We don't control them. But do check, and update them to the target of their redirectes. $(MAKE) -C docs linkcheck || true docserve: @@ -42,13 +42,13 @@ help: @echo " doc make html docs" @echo " docserve run an http server on the docs directory" @echo " html to make standalone HTML files" - @echo " inplace make inplace extension" + @echo " inplace make inplace extension" @echo " install make and install" @echo " install-req install documentation and test dependencies" @echo " install-venv install in virtualenv" @echo " release-test run code and package tests before release" @echo " test run tests on installed pillow" - @echo " upload build and upload sdists to PyPI" + @echo " upload build and upload sdists to PyPI" @echo " upload-test build and upload sdists to test.pythonpackages.com" inplace: clean @@ -61,7 +61,7 @@ install: install-req: pip install -r requirements.txt -install-venv: +install-venv: virtualenv . bin/pip install -r requirements.txt diff --git a/depends/README.rst b/depends/README.rst index 050173679..683b6b83c 100644 --- a/depends/README.rst +++ b/depends/README.rst @@ -22,6 +22,6 @@ e.g.:: $ git checkout [branch or tag] $ virtualenv -p /usr/bin/python2.7 ~/vpy27 $ source ~/vpy27/bin/activate - $ make install + $ make install $ make test diff --git a/depends/alpine_Dockerfile b/depends/alpine_Dockerfile index 1ab624690..05d442bbb 100644 --- a/depends/alpine_Dockerfile +++ b/depends/alpine_Dockerfile @@ -2,8 +2,8 @@ # with all/most of the dependencies working. # # Tcl/Tk isn't detecting -# Freetype has different metrics so tests are failing. -# sudo and bash are required for the webp build script. +# Freetype has different metrics so tests are failing. +# sudo and bash are required for the webp build script. FROM alpine USER root @@ -28,7 +28,7 @@ RUN apk --no-cache add python \ # install from git, run tests, including webp RUN apk --no-cache add git \ bash \ - sudo + sudo RUN git clone https://github.com/python-pillow/Pillow.git /Pillow RUN pip install virtualenv && virtualenv /vpy && source /vpy/bin/activate && pip install nose diff --git a/depends/fedora_23.sh b/depends/fedora_23.sh index 72032cd2e..bad03e764 100755 --- a/depends/fedora_23.sh +++ b/depends/fedora_23.sh @@ -6,7 +6,7 @@ # # note that Fedora does ship packages for Pillow as python-pillow -# this is a workaround for +# this is a workaround for # "gcc: error: /usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory" # errors when compiling. sudo dnf install redhat-rpm-config @@ -14,5 +14,5 @@ sudo dnf install redhat-rpm-config sudo dnf install python-devel python3-devel python-virtualenv make gcc sudo dnf install libtiff-devel libjpeg-devel zlib-devel freetype-devel \ - lcms2-devel libwebp-devel openjpeg2-devel tkinter python3-tkinter \ + lcms2-devel libwebp-devel openjpeg2-devel tkinter python3-tkinter \ tcl-devel tk-devel \ No newline at end of file diff --git a/docs/reference/TiffTags.rst b/docs/reference/TiffTags.rst index cf9a97a2b..1791be40d 100644 --- a/docs/reference/TiffTags.rst +++ b/docs/reference/TiffTags.rst @@ -29,7 +29,7 @@ metadata tag numbers, names, and type information. .. method:: cvt_enum(self, value) :param value: The enumerated value name - :returns: The integer corresponding to the name. + :returns: The integer corresponding to the name. .. versionadded:: 3.0.0 diff --git a/libImaging/Convert.c b/libImaging/Convert.c index a73d7aecd..9c562d4be 100644 --- a/libImaging/Convert.c +++ b/libImaging/Convert.c @@ -144,7 +144,7 @@ la2lA(UINT8* out, const UINT8* in, int xsize) pixel = in[0]; } else { pixel = CLIP((255 * in[0]) / alpha); - } + } *out++ = (UINT8) pixel; *out++ = (UINT8) pixel; *out++ = (UINT8) pixel; diff --git a/libImaging/ImPlatform.h b/libImaging/ImPlatform.h index 43c17cc85..a04bd9dcd 100644 --- a/libImaging/ImPlatform.h +++ b/libImaging/ImPlatform.h @@ -18,7 +18,7 @@ #endif #if defined(PIL_NO_INLINE) -#define inline +#define inline #else #if defined(_MSC_VER) && !defined(__GNUC__) #define inline __inline diff --git a/libImaging/Imaging.h b/libImaging/Imaging.h index 03ea30751..adefbc65b 100644 --- a/libImaging/Imaging.h +++ b/libImaging/Imaging.h @@ -490,8 +490,8 @@ struct ImagingCodecStateInstance { }; -/* Codec read/write python fd */ +/* Codec read/write python fd */ extern Py_ssize_t _imaging_read_pyFd(PyObject *fd, char* dest, Py_ssize_t bytes); extern Py_ssize_t _imaging_write_pyFd(PyObject *fd, char* src, Py_ssize_t bytes); extern int _imaging_seek_pyFd(PyObject *fd, Py_ssize_t offset, int whence); diff --git a/libImaging/Jpeg2KEncode.c b/libImaging/Jpeg2KEncode.c index 1747ec1f1..a175a04c7 100644 --- a/libImaging/Jpeg2KEncode.c +++ b/libImaging/Jpeg2KEncode.c @@ -362,7 +362,7 @@ j2k_encode_entry(Imaging im, ImagingCodecState state) state->errcode = IMAGING_CODEC_BROKEN; state->state = J2K_STATE_FAILED; goto quick_exit; - } + } /* Setup compression context */ context->error_msg = NULL; diff --git a/libImaging/Resample.c b/libImaging/Resample.c index 54862d725..23a83e151 100644 --- a/libImaging/Resample.c +++ b/libImaging/Resample.c @@ -391,7 +391,7 @@ ImagingResampleHorizontal_32bpc(Imaging imIn, int xsize, struct filter *filterp) return NULL; } - ImagingSectionEnter(&cookie); + ImagingSectionEnter(&cookie); switch(imIn->type) { case IMAGING_TYPE_INT32: for (yy = 0; yy < imOut->ysize; yy++) { @@ -451,7 +451,7 @@ ImagingResampleVertical_32bpc(Imaging imIn, int ysize, struct filter *filterp) return NULL; } - ImagingSectionEnter(&cookie); + ImagingSectionEnter(&cookie); switch(imIn->type) { case IMAGING_TYPE_INT32: for (yy = 0; yy < ysize; yy++) { diff --git a/libImaging/TiffDecode.h b/libImaging/TiffDecode.h index 2c8eeecae..e14a09329 100644 --- a/libImaging/TiffDecode.h +++ b/libImaging/TiffDecode.h @@ -34,7 +34,7 @@ typedef struct { int fp; uint32 ifd; /* offset of the ifd, used for multipage * Should be uint32 for libtiff 3.9.x - * uint64 for libtiff 4.0.x + * uint64 for libtiff 4.0.x */ TIFF *tiff; /* Used in write */ toff_t eof; @@ -48,7 +48,7 @@ extern int ImagingLibTiffEncodeInit(ImagingCodecState state, char *filename, int extern int ImagingLibTiffSetField(ImagingCodecState state, ttag_t tag, ...); -/* +/* Trace debugging legacy, don't enable for Python 3.x, unicode issues. */ diff --git a/winbuild/build.py b/winbuild/build.py index ec70250c6..6156010cf 100644 --- a/winbuild/build.py +++ b/winbuild/build.py @@ -75,7 +75,7 @@ def build_one(py_ver, compiler): else: args['python_path'] = "%s%s\\Scripts" % (VIRT_BASE, py_ver) args['py_ver'] = py_ver - if '34' in py_ver: + if '34' in py_ver: args['tcl_ver'] = '86' else: args['tcl_ver'] = '85'