Apply ruff autofixes

This commit is contained in:
Aarni Koskela 2023-02-23 15:45:11 +02:00
parent de6c4b09d7
commit 307d00b44d
6 changed files with 14 additions and 15 deletions

View File

@ -1,6 +1,6 @@
import sys import sys
from setuptools.build_meta import * # noqa: F401, F403 from setuptools.build_meta import * # noqa: F403
from setuptools.build_meta import build_wheel from setuptools.build_meta import build_wheel
backend_class = build_wheel.__self__.__class__ backend_class = build_wheel.__self__.__class__

View File

@ -318,14 +318,14 @@ def setup(app):
linkcheck_allowed_redirects = { linkcheck_allowed_redirects = {
r"https://www.bestpractices.dev/projects/6331": r"https://www.bestpractices.dev/en/.*", # noqa: E501 r"https://www.bestpractices.dev/projects/6331": r"https://www.bestpractices.dev/en/.*",
r"https://badges.gitter.im/python-pillow/Pillow.svg": r"https://badges.gitter.im/repo.svg", # noqa: E501 r"https://badges.gitter.im/python-pillow/Pillow.svg": r"https://badges.gitter.im/repo.svg",
r"https://gitter.im/python-pillow/Pillow?.*": r"https://app.gitter.im/#/room/#python-pillow_Pillow:gitter.im?.*", # noqa: E501 r"https://gitter.im/python-pillow/Pillow?.*": r"https://app.gitter.im/#/room/#python-pillow_Pillow:gitter.im?.*",
r"https://pillow.readthedocs.io/?badge=latest": r"https://pillow.readthedocs.io/en/stable/?badge=latest", # noqa: E501 r"https://pillow.readthedocs.io/?badge=latest": r"https://pillow.readthedocs.io/en/stable/?badge=latest",
r"https://pillow.readthedocs.io": r"https://pillow.readthedocs.io/en/stable/", r"https://pillow.readthedocs.io": r"https://pillow.readthedocs.io/en/stable/",
r"https://tidelift.com/badges/package/pypi/Pillow?.*": r"https://img.shields.io/badge/.*", # noqa: E501 r"https://tidelift.com/badges/package/pypi/Pillow?.*": r"https://img.shields.io/badge/.*",
r"https://zenodo.org/badge/17549/python-pillow/Pillow.svg": r"https://zenodo.org/badge/doi/[\.0-9]+/zenodo.[0-9]+.svg", # noqa: E501 r"https://zenodo.org/badge/17549/python-pillow/Pillow.svg": r"https://zenodo.org/badge/doi/[\.0-9]+/zenodo.[0-9]+.svg",
r"https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow": r"https://zenodo.org/record/[0-9]+", # noqa: E501 r"https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow": r"https://zenodo.org/record/[0-9]+",
} }
# sphinx.ext.extlinks # sphinx.ext.extlinks

View File

@ -222,7 +222,7 @@ class UnsharpMask(MultibandFilter):
.. _digital unsharp masking: https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking .. _digital unsharp masking: https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking
""" # noqa: E501 """
name = "UnsharpMask" name = "UnsharpMask"

View File

@ -18,10 +18,9 @@ import os
import tempfile import tempfile
from . import Image, ImageFile from . import Image, ImageFile
from ._binary import i8 from ._binary import i8, o8
from ._binary import i16be as i16 from ._binary import i16be as i16
from ._binary import i32be as i32 from ._binary import i32be as i32
from ._binary import o8
COMPRESSION = {1: "raw", 5: "jpeg"} COMPRESSION = {1: "raw", 5: "jpeg"}

View File

@ -244,7 +244,7 @@ class _PyAccessI16_L(PyAccess):
except TypeError: except TypeError:
color = min(color[0], 65535) color = min(color[0], 65535)
pixel.l = color & 0xFF # noqa: E741 pixel.l = color & 0xFF
pixel.r = color >> 8 pixel.r = color >> 8
@ -265,7 +265,7 @@ class _PyAccessI16_B(PyAccess):
except Exception: except Exception:
color = min(color[0], 65535) color = min(color[0], 65535)
pixel.l = color >> 8 # noqa: E741 pixel.l = color >> 8
pixel.r = color & 0xFF pixel.r = color & 0xFF

View File

@ -239,7 +239,7 @@ DEPS = {
"libs": ["*.lib"], "libs": ["*.lib"],
}, },
"freetype": { "freetype": {
"url": "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.gz", # noqa: E501 "url": "https://download.savannah.gnu.org/releases/freetype/freetype-2.13.2.tar.gz",
"filename": "freetype-2.13.2.tar.gz", "filename": "freetype-2.13.2.tar.gz",
"dir": "freetype-2.13.2", "dir": "freetype-2.13.2",
"license": ["LICENSE.TXT", r"docs\FTL.TXT", r"docs\GPLv2.TXT"], "license": ["LICENSE.TXT", r"docs\FTL.TXT", r"docs\GPLv2.TXT"],
@ -321,7 +321,7 @@ DEPS = {
}, },
"libimagequant": { "libimagequant": {
# commit: Merge branch 'master' into msvc (matches 2.17.0 tag) # commit: Merge branch 'master' into msvc (matches 2.17.0 tag)
"url": "https://github.com/ImageOptim/libimagequant/archive/e4c1334be0eff290af5e2b4155057c2953a313ab.zip", # noqa: E501 "url": "https://github.com/ImageOptim/libimagequant/archive/e4c1334be0eff290af5e2b4155057c2953a313ab.zip",
"filename": "libimagequant-e4c1334be0eff290af5e2b4155057c2953a313ab.zip", "filename": "libimagequant-e4c1334be0eff290af5e2b4155057c2953a313ab.zip",
"dir": "libimagequant-e4c1334be0eff290af5e2b4155057c2953a313ab", "dir": "libimagequant-e4c1334be0eff290af5e2b4155057c2953a313ab",
"license": "COPYRIGHT", "license": "COPYRIGHT",