From 0deb9262c952d65ea673eb7e0bd0282230101f9c Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Wed, 21 Jun 2023 15:30:40 +0200 Subject: [PATCH] use in operator for enum tests Fixes a complaint by mypy. --- nominatim/api/v1/helpers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nominatim/api/v1/helpers.py b/nominatim/api/v1/helpers.py index 62e5e943..ea7c125d 100644 --- a/nominatim/api/v1/helpers.py +++ b/nominatim/api/v1/helpers.py @@ -62,13 +62,13 @@ def extend_query_parts(queryparts: Dict[str, Any], details: Dict[str, Any], """ parsed = SearchDetails.from_kwargs(details) if parsed.geometry_output != GeometryFormat.NONE: - if parsed.geometry_output & GeometryFormat.GEOJSON: + if GeometryFormat.GEOJSON in parsed.geometry_output: queryparts['polygon_geojson'] = '1' - if parsed.geometry_output & GeometryFormat.KML: + if GeometryFormat.KML in parsed.geometry_output: queryparts['polygon_kml'] = '1' - if parsed.geometry_output & GeometryFormat.SVG: + if GeometryFormat.SVG in parsed.geometry_output: queryparts['polygon_svg'] = '1' - if parsed.geometry_output & GeometryFormat.TEXT: + if GeometryFormat.TEXT in parsed.geometry_output: queryparts['polygon_text'] = '1' if parsed.address_details: queryparts['addressdetails'] = '1' -- 2.39.5