From 8eeccc012a1bfb6bc80c9b601860982ae0620ba2 Mon Sep 17 00:00:00 2001 From: Filippo Campi Date: Mon, 10 Jun 2024 11:40:25 +0200 Subject: [PATCH] black --- .pre-commit-config.yaml | 8 +++---- .../restapi/services/types/get.py | 24 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4ab1c2e..b10f5fc8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,13 +8,13 @@ default_stages: [commit, push] repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.6.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 24.4.2 hooks: - id: black # args: ["--line-length=88", "--check", "--diff", "--force-exclude=migrations", "src/"] @@ -22,7 +22,7 @@ repos: types: [python] entry: black - repo: https://github.com/PyCQA/flake8.git - rev: "6.1.0" + rev: "7.0.0" hooks: - id: flake8 name: flake8 @@ -31,7 +31,7 @@ repos: types: [python] args: ["--max-complexity=30", "--max-line-length=88", "--ignore=DJ01,DJ08,W503,ANN101", "--exclude=docs/*", "src/", "setup.py"] - repo: https://github.com/pycqa/isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort name: isort (python) diff --git a/src/design/plone/contenttypes/restapi/services/types/get.py b/src/design/plone/contenttypes/restapi/services/types/get.py index 206dd81b..c18ce171 100644 --- a/src/design/plone/contenttypes/restapi/services/types/get.py +++ b/src/design/plone/contenttypes/restapi/services/types/get.py @@ -185,25 +185,25 @@ def customize_venue_schema(self, result): } if "city" in result["properties"]: if not result["properties"]["city"].get("default", ""): - result["properties"]["city"][ - "default" - ] = api.portal.get_registry_record( - "city", interface=IGeolocationDefaults + result["properties"]["city"]["default"] = ( + api.portal.get_registry_record( + "city", interface=IGeolocationDefaults + ) ) if "zip_code" in result["properties"]: if not result["properties"]["zip_code"].get("default", ""): - result["properties"]["zip_code"][ - "default" - ] = api.portal.get_registry_record( - "zip_code", interface=IGeolocationDefaults + result["properties"]["zip_code"]["default"] = ( + api.portal.get_registry_record( + "zip_code", interface=IGeolocationDefaults + ) ) if "street" in result["properties"]: if not result["properties"]["street"].get("default", ""): - result["properties"]["street"][ - "default" - ] = api.portal.get_registry_record( - "street", interface=IGeolocationDefaults + result["properties"]["street"]["default"] = ( + api.portal.get_registry_record( + "street", interface=IGeolocationDefaults + ) ) if "geolocation" in result["properties"]: