Skip to content

Commit

Permalink
Apply ruff autofixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akx committed Nov 3, 2023
1 parent 8220c2e commit 93c8201
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion _custom_build/backend.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sys

from setuptools.build_meta import * # noqa: F401, F403
from setuptools.build_meta import * # noqa: F403
from setuptools.build_meta import build_wheel

backend_class = build_wheel.__self__.__class__
Expand Down
14 changes: 7 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,14 @@ def setup(app):


linkcheck_allowed_redirects = {
r"https://www.bestpractices.dev/projects/6331": r"https://www.bestpractices.dev/en/.*", # noqa: E501
r"https://badges.gitter.im/python-pillow/Pillow.svg": r"https://badges.gitter.im/repo.svg", # noqa: E501
r"https://gitter.im/python-pillow/Pillow?.*": r"https://app.gitter.im/#/room/#python-pillow_Pillow:gitter.im?.*", # noqa: E501
r"https://pillow.readthedocs.io/?badge=latest": r"https://pillow.readthedocs.io/en/stable/?badge=latest", # 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",
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",
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://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/latestdoi/17549/python-pillow/Pillow": r"https://zenodo.org/record/[0-9]+", # 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",
r"https://zenodo.org/badge/latestdoi/17549/python-pillow/Pillow": r"https://zenodo.org/record/[0-9]+",
}

# sphinx.ext.extlinks
Expand Down
2 changes: 1 addition & 1 deletion src/PIL/ImageFilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ class UnsharpMask(MultibandFilter):
.. _digital unsharp masking: https://en.wikipedia.org/wiki/Unsharp_masking#Digital_unsharp_masking
""" # noqa: E501
"""

name = "UnsharpMask"

Expand Down
3 changes: 1 addition & 2 deletions src/PIL/IptcImagePlugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
import tempfile

from . import Image, ImageFile
from ._binary import i8
from ._binary import i8, o8
from ._binary import i16be as i16
from ._binary import i32be as i32
from ._binary import o8

COMPRESSION = {1: "raw", 5: "jpeg"}

Expand Down
4 changes: 2 additions & 2 deletions src/PIL/PyAccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ def set_pixel(self, x, y, color):
except TypeError:
color = min(color[0], 65535)

pixel.l = color & 0xFF # noqa: E741
pixel.l = color & 0xFF
pixel.r = color >> 8


Expand All @@ -265,7 +265,7 @@ def set_pixel(self, x, y, color):
except Exception:
color = min(color[0], 65535)

pixel.l = color >> 8 # noqa: E741
pixel.l = color >> 8
pixel.r = color & 0xFF


Expand Down
4 changes: 2 additions & 2 deletions winbuild/build_prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def cmd_msbuild(
"libs": ["*.lib"],
},
"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",
"dir": "freetype-2.13.2",
"license": ["LICENSE.TXT", r"docs\FTL.TXT", r"docs\GPLv2.TXT"],
Expand Down Expand Up @@ -321,7 +321,7 @@ def cmd_msbuild(
},
"libimagequant": {
# 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",
"dir": "libimagequant-e4c1334be0eff290af5e2b4155057c2953a313ab",
"license": "COPYRIGHT",
Expand Down

0 comments on commit 93c8201

Please sign in to comment.