X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/195f9f5ef3f79ea4c77ee1226f8aa7e7e8f4a73f..c2bdda8895963cece639a9e93ceff31465b518b5:/nominatim/clicmd/api.py?ds=sidebyside diff --git a/nominatim/clicmd/api.py b/nominatim/clicmd/api.py index e50c00dc..b99d37b8 100644 --- a/nominatim/clicmd/api.py +++ b/nominatim/clicmd/api.py @@ -3,7 +3,7 @@ Subcommand definitions for API calls from the command line. """ import logging -from ..tools.exec_utils import run_api_script +from nominatim.tools.exec_utils import run_api_script # Do not repeat documentation of subcommand classes. # pylint: disable=C0111 @@ -21,8 +21,8 @@ STRUCTURED_QUERY = ( EXTRADATA_PARAMS = ( ('addressdetails', 'Include a breakdown of the address into elements.'), - ('extratags', """Include additional information if available - (e.g. wikipedia link, opening hours)."""), + ('extratags', ("Include additional information if available " + "(e.g. wikipedia link, opening hours).")), ('namedetails', 'Include a list of alternative names.') ) @@ -49,8 +49,8 @@ def _add_api_output_arguments(parser): choices=['geojson', 'kml', 'svg', 'text'], help='Output geometry of results as a GeoJSON, KML, SVG or WKT.') group.add_argument('--polygon-threshold', type=float, metavar='TOLERANCE', - help="""Simplify output geometry. - Parameter is difference tolerance in degrees.""") + help=("Simplify output geometry." + "Parameter is difference tolerance in degrees.")) class APISearch: @@ -90,7 +90,7 @@ class APISearch: if args.query: params = dict(q=args.query) else: - params = {k : getattr(args, k) for k, _ in STRUCTURED_QUERY if getattr(args, k)} + params = {k: getattr(args, k) for k, _ in STRUCTURED_QUERY if getattr(args, k)} for param, _ in EXTRADATA_PARAMS: if getattr(args, param): @@ -154,7 +154,7 @@ class APIReverse: class APILookup: """\ - Execute API reverse query. + Execute API lookup query. """ @staticmethod @@ -189,7 +189,7 @@ class APILookup: class APIDetails: """\ - Execute API lookup query. + Execute API details query. """ @staticmethod @@ -205,8 +205,8 @@ class APIDetails: objs.add_argument('--place_id', '-p', type=int, help='Database internal identifier of the OSM object to look up.') group.add_argument('--class', dest='object_class', - help="""Class type to disambiguated multiple entries - of the same object.""") + help=("Class type to disambiguated multiple entries " + "of the same object.")) group = parser.add_argument_group('Output arguments') for name, desc in DETAILS_SWITCHES: