mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-12 13:54:07 +00:00
add sanic development server implementation
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user