Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
eikichi18 committed Jun 10, 2024
1 parent 0bb9819 commit 8eeccc0
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ 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/"]
args: ["--line-length=88", "--force-exclude=migrations", "src/"]
types: [python]
entry: black
- repo: https://github.com/PyCQA/flake8.git
rev: "6.1.0"
rev: "7.0.0"
hooks:
- id: flake8
name: flake8
Expand All @@ -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)
Expand Down
24 changes: 12 additions & 12 deletions src/design/plone/contenttypes/restapi/services/types/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down

0 comments on commit 8eeccc0

Please sign in to comment.