[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-02-23 21:42:29 +00:00
parent c19b86bf03
commit 4e154fe909
2 changed files with 3 additions and 3 deletions

View file

@ -1,10 +1,10 @@
from appconf import AppConf
from django.conf import settings
from packaging.version import Version, parse
from PIL import Image
from PIL import __version__ as __pil_version__
from packaging.version import parse, Version
if parse(__pil_version__) > Version('9.1.0'):
if parse(__pil_version__) > Version("9.1.0"):
# https://pillow.readthedocs.io/en/stable/deprecations.html#constants
# https://github.com/jazzband/django-avatar/issues/222
# Since 9.1.0, Image.ANTIALIAS is deprecated and replaced by Image.Resampling.LANCZOS and Image.LANCZOS

View file

@ -211,7 +211,7 @@ appear on the site. Listed below are those settings:
.. py:data:: AVATAR_RESIZE_METHOD
The method to use when resizing images, based on the options available in
Pillow. Defaults to ``Image.Resampling.LANCZOS`` if the version of Pillow
Pillow. Defaults to ``Image.Resampling.LANCZOS`` if the version of Pillow
is greater than 9.1.0 otherwise it's ``Image.ANTIALIASING``
.. py:data:: AVATAR_STORAGE_DIR