shopping street (Q21000333) is a type of street

This commit is contained in:
Edward Betts 2021-06-16 17:51:47 +02:00
parent b460e9a848
commit b4a948e9ef

View file

@ -137,7 +137,11 @@ class Item(Base):
return dict(d) or None return dict(d) or None
def is_street(self): def is_street(self):
return any(v and v["id"] == 'Q79007' for v in self.get_claim("P31")) street_items = {
'Q79007', # street
'Q21000333', # shopping street
}
return any(v and v["id"] in street_items for v in self.get_claim("P31"))
# class Claim(Base): # class Claim(Base):