From d7dd9ec17c41bffaa5241f954905b322ff17bcf5 Mon Sep 17 00:00:00 2001 From: Edward Betts Date: Sat, 4 May 2024 11:13:05 +0300 Subject: [PATCH] Code formatting --- matcher/model.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/matcher/model.py b/matcher/model.py index 63fba92..40d56f5 100644 --- a/matcher/model.py +++ b/matcher/model.py @@ -6,7 +6,7 @@ from collections import defaultdict from typing import Any import sqlalchemy -from flask_login import UserMixin +from flask_login import UserMixin # type: ignore from geoalchemy2 import Geometry from sqlalchemy import func from sqlalchemy.dialects import postgresql @@ -138,9 +138,11 @@ class Item(Base): """List of claims for given Wikidata property ID.""" claims = typing.cast(wikidata.Claims, self.claims) return [ - i["mainsnak"]["datavalue"]["value"] - if "datavalue" in i["mainsnak"] - else None + ( + i["mainsnak"]["datavalue"]["value"] + if "datavalue" in i["mainsnak"] + else None + ) for i in claims.get(pid, []) ]