]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/result_formatter/base.py
update dependencies for Actions
[nominatim.git] / nominatim / result_formatter / base.py
index 88f4d9183a3ff172fbe856741d88423d65312c2f..d77f4db883d33171d152570c461050f1438cbb4b 100644 (file)
@@ -28,6 +28,12 @@ class ResultFormatter(Generic[T]):
         return list(self.functions.keys())
 
 
+    def supports_format(self, fmt: str) -> bool:
+        """ Check if the given format is supported by this formatter.
+        """
+        return fmt in self.functions
+
+
     def format(self, result: T, fmt: str) -> str:
         """ Convert the given result into a string using the given format.