Skip to content

Commit

Permalink
Update pip dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
timobrembeck committed Jun 5, 2024
1 parent 5c6602a commit 8563747
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 100 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-merge-conflict
Expand All @@ -17,11 +17,11 @@ repos:
- id: no-commit-to-branch
args: [--branch, main, --branch, develop]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.4.7
hooks:
- id: ruff
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
rev: v0.10.0.1
hooks:
- id: shellcheck
args: [--external-sources]
Expand All @@ -30,7 +30,7 @@ repos:
hooks:
- id: isort
- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.4.2
hooks:
- id: black
- repo: https://github.com/Riverside-Healthcare/djLint
Expand Down Expand Up @@ -73,7 +73,7 @@ repos:
language: script
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.10.0
hooks:
- id: mypy
additional_dependencies: [types-python-dateutil, types-PyYAML, types-requests]
7 changes: 5 additions & 2 deletions integreat_cms/cms/utils/media_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import logging
from io import BytesIO
from typing import TYPE_CHECKING

from django.conf import settings
from django.core.files.uploadedfile import InMemoryUploadedFile
Expand Down Expand Up @@ -39,14 +40,16 @@ def generate_thumbnail(
image = Image.open(original_image)
# Save format, as this information will be lost when resizing the image
image_format = image.format
if TYPE_CHECKING:
assert image_format
if crop:
# Get minimum of original size of the image because ImageOps.fit would otherwise increase the image size
size = min(image.width, image.height, size)
# Resize and crop the image into a square of at most the specified size.
image = ImageOps.fit(image, (size, size), method=Image.LANCZOS)
image = ImageOps.fit(image, (size, size), method=Image.LANCZOS) # type: ignore[attr-defined]
else:
# Resize the image so that the longer side is at most the specified size
image.thumbnail((size, size), resample=Image.LANCZOS)
image.thumbnail((size, size), resample=Image.LANCZOS) # type: ignore[attr-defined]
# Write PIL image to BytesIO buffer
buffer = BytesIO()
# Use optimize option to reduce the image size. Higher quality parameter reduces compression
Expand Down
187 changes: 94 additions & 93 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ dependencies = [
"django-cors-headers",
"django-db-mutex",
"django-debug-toolbar",
"django-import-export",
"django-import-export==3.3.9",
"django-linkcheck",
"django-polymorphic",
"django-redis",
Expand Down Expand Up @@ -112,40 +112,39 @@ dev = [
"types-requests",
]
pinned = [
"aiohttp==3.9.3",
"aiohttp==3.9.5",
"aiosignal==1.3.1",
"annotated-types==0.6.0",
"arabic-reshaper==3.0.0",
"argon2-cffi==23.1.0",
"argon2-cffi-bindings==21.2.0",
"asgiref==3.7.2",
"asgiref==3.8.1",
"asn1crypto==1.5.1",
"asttokens==2.4.1",
"attrs==23.2.0",
"bcrypt==4.1.2",
"bcrypt==4.1.3",
"cachetools==5.3.3",
"cbor2==5.6.1",
"certifi==2024.2.2",
"cbor2==5.6.3",
"certifi==2024.6.2",
"cffi==1.16.0",
"charset-normalizer==3.3.2",
"click==8.1.7",
"cryptography==42.0.5",
"cryptography==42.0.8",
"cssselect2==0.7.0",
"decorator==5.1.1",
"deepl==1.17.0",
"deepl==1.18.0",
"defusedxml==0.7.1",
"diff-match-patch==20230430",
"Django==4.2.10",
"Django==4.2.13",
"django-cacheops==7.0.2",
"django-cors-headers==4.3.1",
"django-db-mutex==3.1.0",
"django-debug-toolbar==4.3.0",
"django-import-export==3.3.7",
"django-debug-toolbar==4.4.2",
"django-import-export==3.3.9",
"django-linkcheck==2.3.0",
"django-polymorphic==3.1.0",
"django-redis==5.4.0",
"django-treebeard==4.7.1",
"django-webpack-loader==3.0.1",
"django-webpack-loader==3.1.0",
"django-widget-tweaks==1.5.0",
"et-xmlfile==1.1.0",
"executing==2.0.1",
Expand All @@ -154,75 +153,74 @@ pinned = [
"funcy==2.0",
"geographiclib==2.0",
"geopy==2.4.1",
"google-api-core==2.18.0",
"googleapis-common-protos==1.63.0",
"google-api-core==2.19.0",
"googleapis-common-protos==1.63.1",
"google-auth==2.29.0",
"google-cloud-core==2.4.1",
"google-cloud-translate==3.15.0",
"grpcio==1.62.2",
"google-cloud-translate==3.15.3",
"grpcio==1.64.1",
"grpcio-status==1.62.2",
"html5lib==1.1",
"idna==3.6",
"ipython==8.21.0",
"idna==3.7",
"ipython==8.25.0",
"jedi==0.19.1",
"jsonschema==4.21.1",
"jsonschema==4.22.0",
"jsonschema-specifications==2023.12.1",
"lxml==5.1.0",
"lxml==5.2.2",
"MarkupPy==1.14",
"matplotlib-inline==0.1.6",
"matplotlib-inline==0.1.7",
"multidict==6.0.5",
"natsort==8.4.0",
"odfpy==1.4.1",
"openpyxl==3.1.2",
"openpyxl==3.1.3",
"oscrypto==1.3.0",
"parso==0.8.3",
"parso==0.8.4",
"pexpect==4.9.0",
"pillow==10.2.0",
"pillow==10.3.0",
"pip==24.0",
"prompt-toolkit==3.0.43",
"prompt_toolkit==3.0.46",
"protobuf==4.25.3",
"proto-plus==1.23.0",
"psycopg==3.1.18",
"psycopg-binary==3.1.18",
"psycopg==3.1.19",
"psycopg-binary==3.1.19",
"ptyprocess==0.7.0",
"pure-eval==0.2.2",
"pyasn1==0.6.0",
"pyasn1_modules==0.4.0",
"pycparser==2.21",
"pydantic==2.6.1",
"pydantic_core==2.16.2",
"Pygments==2.17.2",
"pyHanko==0.21.0",
"pycparser==2.22",
"Pygments==2.18.0",
"pyHanko==0.25.0",
"pyhanko-certvalidator==0.26.3",
"pyOpenSSL==24.0.0",
"pyOpenSSL==24.1.0",
"pyotp==2.9.0",
"PyPDF3==1.0.6",
"pypng==0.20220715.0",
"python-bidi==0.4.2",
"python-dateutil==2.8.2",
"python-dateutil==2.9.0.post0",
"python-magic==0.4.27",
"PyYAML==6.0.1",
"qrcode==7.4.2",
"redis==5.0.1",
"referencing==0.33.0",
"redis==5.0.4",
"referencing==0.35.1",
"reportlab==3.6.13",
"requests==2.31.0",
"rpds-py==0.17.1",
"rules==3.3",
"requests==2.32.3",
"rpds-py==0.18.1",
"rsa==4.9",
"rules==3.4",
"setuptools==65.5.0",
"sgmllib3k==1.0.0",
"six==1.16.0",
"sqlparse==0.4.4",
"sqlparse==0.5.0",
"stack-data==0.6.3",
"svglib==1.5.1",
"tablib==3.5.0",
"tinycss2==1.2.1",
"tqdm==4.66.1",
"traitlets==5.14.1",
"typing_extensions==4.9.0",
"tinycss2==1.3.0",
"tqdm==4.66.4",
"traitlets==5.14.3",
"typing_extensions==4.12.1",
"tzlocal==5.2",
"uritools==4.0.2",
"urllib3==2.2.0",
"uritools==4.0.3",
"urllib3==2.2.1",
"wcwidth==0.2.13",
"webauthn==2.1.0",
"webencodings==0.5.1",
Expand All @@ -233,81 +231,84 @@ pinned = [
]
dev-pinned = [
"alabaster==0.7.16",
"astroid==3.0.3",
"Babel==2.14.0",
"black==24.1.1",
"build==1.0.3",
"astroid==3.2.2",
"Babel==2.15.0",
"backports.tarfile==1.2.0",
"black==24.4.2",
"build==1.2.1",
"bumpver==2023.1129",
"cfgv==3.4.0",
"colorama==0.4.6",
"coverage==7.4.1",
"cssbeautifier==1.14.11",
"coverage==7.5.3",
"cssbeautifier==1.15.1",
"dill==0.3.8",
"distlib==0.3.8",
"djlint==1.34.1",
"docutils==0.20.1",
"EditorConfig==0.12.3",
"execnet==2.0.2",
"filelock==3.13.1",
"freezegun==1.4.0",
"EditorConfig==0.12.4",
"execnet==2.1.1",
"filelock==3.14.0",
"freezegun==1.5.1",
"html-tag-names==0.1.2",
"html-void-elements==0.1.0",
"icdiff==2.0.7",
"identify==2.5.33",
"identify==2.5.36",
"imagesize==1.4.1",
"importlib-metadata==7.0.1",
"importlib_metadata==7.1.0",
"iniconfig==2.0.0",
"isort==5.13.2",
"jaraco.classes==3.3.1",
"jaraco.classes==3.4.0",
"jaraco.context==5.3.0",
"jaraco.functools==4.0.1",
"jeepney==0.8.0",
"Jinja2==3.1.3",
"jsbeautifier==1.14.11",
"json5==0.9.14",
"keyring==24.3.0",
"Jinja2==3.1.4",
"jsbeautifier==1.15.1",
"json5==0.9.25",
"keyring==25.2.1",
"lexid==2021.1006",
"looseversion==1.3.0",
"markdown-it-py==3.0.0",
"MarkupSafe==2.1.5",
"mccabe==0.7.0",
"mdurl==0.1.2",
"more-itertools==10.2.0",
"mypy==1.8.0",
"mypy==1.10.0",
"mypy-extensions==1.0.0",
"nh3==0.2.15",
"nodeenv==1.8.0",
"packaging==23.2",
"nh3==0.2.17",
"nodeenv==1.9.1",
"packaging==24.0",
"pathspec==0.12.1",
"pkginfo==1.9.6",
"platformdirs==4.2.0",
"pluggy==1.4.0",
"pkginfo==1.11.0",
"platformdirs==4.2.2",
"pluggy==1.5.0",
"pprintpp==0.4.0",
"pre-commit==3.6.0",
"pre-commit==3.7.1",
"PyJWT==2.8.0",
"pylint==3.0.3",
"pylint==3.2.2",
"pylint-django==2.5.5",
"pylint-per-file-ignores==1.3.2",
"pylint-plugin-utils==0.8.2",
"pyproject_hooks==1.0.0",
"pyproject_hooks==1.1.0",
"pytest==7.4.4",
"pytest-circleci-parallelized==0.1.0",
"pytest-cov==4.1.0",
"pytest-cov==5.0.0",
"pytest-django==4.8.0",
"pytest-httpserver==1.0.8",
"pytest_httpserver==1.0.10",
"pytest-icdiff==0.9",
"pytest-order==1.2.0",
"pytest-order==1.2.1",
"pytest-testmon==1.4.5",
"pytest-xdist==3.5.0",
"readme-renderer==42.0",
"pytest-xdist==3.6.1",
"readme_renderer==43.0",
"regex==2023.12.25",
"requests-mock==1.11.0",
"requests-mock==1.12.1",
"requests-toolbelt==1.0.0",
"rfc3986==2.0.0",
"rich==13.7.0",
"ruff==0.3.5",
"rich==13.7.1",
"ruff==0.4.8",
"SecretStorage==3.3.3",
"shellcheck-py==0.9.0.6",
"shellcheck-py==0.10.0.1",
"snowballstemmer==2.2.0",
"Sphinx==7.2.6",
"Sphinx==7.3.7",
"sphinxcontrib-applehelp==1.0.8",
"sphinxcontrib-devhelp==1.0.6",
"sphinxcontrib-django==2.5",
Expand All @@ -316,17 +317,17 @@ dev-pinned = [
"sphinxcontrib-jsmath==1.0.1",
"sphinxcontrib-qthelp==1.0.7",
"sphinxcontrib-serializinghtml==1.1.10",
"sphinx-last-updated-by-git==0.3.6",
"sphinx-last-updated-by-git==0.3.7",
"sphinx-rtd-theme==2.0.0",
"toml==0.10.2",
"tomlkit==0.12.3",
"twine==4.0.2",
"types-python-dateutil==2.8.19.20240106",
"types-PyYAML==6.0.12.12",
"types-requests==2.31.0.20240125",
"virtualenv==20.25.0",
"Werkzeug==3.0.1",
"zipp==3.17.0",
"tomlkit==0.12.5",
"twine==5.1.0",
"types-python-dateutil==2.9.0.20240316",
"types-PyYAML==6.0.12.20240311",
"types-requests==2.32.0.20240602",
"virtualenv==20.26.2",
"Werkzeug==3.0.3",
"zipp==3.19.2",
]

[project.urls]
Expand Down

0 comments on commit 8563747

Please sign in to comment.