From 32f6a7a0e57835ba48bc2d0759ebcf556b2c2b6d Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 21 Aug 2023 16:34:39 +0100 Subject: [PATCH 1/2] fix: typing issues and imports --- osm_fieldwork/basemapper.py | 2 +- osm_fieldwork/odk_merge.py | 6 +++--- osm_fieldwork/sqlite.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/osm_fieldwork/basemapper.py b/osm_fieldwork/basemapper.py index 0e20c4d3..0c12d880 100755 --- a/osm_fieldwork/basemapper.py +++ b/osm_fieldwork/basemapper.py @@ -29,7 +29,7 @@ import queue import concurrent.futures import threading -from osm_fieldwork.sqlite import DataFile +from osm_fieldwork.sqlite import DataFile, MapTile # Instantiate logger log = logging.getLogger(__name__) diff --git a/osm_fieldwork/odk_merge.py b/osm_fieldwork/odk_merge.py index f0a8b6be..2fa0aa20 100755 --- a/osm_fieldwork/odk_merge.py +++ b/osm_fieldwork/odk_merge.py @@ -530,9 +530,9 @@ def main(): formatter_class=argparse.RawDescriptionHelpFormatter, description="This program conflates ODK data with existing features from OSM.", epilog=""" -This program conflates the output from Osm-Fieldwork after converting -the JSON file from ODK Central to OSM XML. The data source for existing data can' -be either the data extract used by the XLSForm, or a postgresql database. + This program conflates the output from Osm-Fieldwork after converting + the JSON file from ODK Central to OSM XML. The data source for existing data can' + be either the data extract used by the XLSForm, or a postgresql database. examples: odk_merge.py [OPTIONS] [OSMFILE] [DATAFILE] diff --git a/osm_fieldwork/sqlite.py b/osm_fieldwork/sqlite.py index b94d1568..e52c9b16 100755 --- a/osm_fieldwork/sqlite.py +++ b/osm_fieldwork/sqlite.py @@ -36,7 +36,7 @@ def __init__(self, y: int = None, z: int = None, filespec: str = None, - tile: MapTile = None, + tile: 'MapTile' = None, suffix="jpg" ): """ @@ -74,7 +74,7 @@ def __init__(self, self.y = tmp[1].replace("." + suffix, "") def readImage(self, - base (str)= "./" + base: str = "./" ): """ Read a map tile out of the disk based map tile cache From fe5f2362bf51a4e86f9d0bbf2932546d23093dd7 Mon Sep 17 00:00:00 2001 From: sam Date: Mon, 21 Aug 2023 17:12:53 +0100 Subject: [PATCH 2/2] fix: indentation on odk_merge --- osm_fieldwork/odk_merge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osm_fieldwork/odk_merge.py b/osm_fieldwork/odk_merge.py index 2fa0aa20..4619d594 100755 --- a/osm_fieldwork/odk_merge.py +++ b/osm_fieldwork/odk_merge.py @@ -524,7 +524,7 @@ def conflateThread(features: dict, def main(): - """This main function lets this class be run standalone by a bash script""" + """This main function lets this class be run standalone by a bash script""" parser = argparse.ArgumentParser( prog="odk_merge.py", formatter_class=argparse.RawDescriptionHelpFormatter,