Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 13, 2023
1 parent 99353a2 commit fa77a1b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion osm_fieldwork/basemapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import argparse
import concurrent.futures
import geojson
import logging
import queue
import re
Expand All @@ -29,6 +28,7 @@
from pathlib import Path
from typing import Union

import geojson
import mercantile
from cpuinfo import get_cpu_info
from pmtiles.tile import (
Expand Down
8 changes: 5 additions & 3 deletions osm_fieldwork/osmfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ def createWay(
for ref in way["refs"]:
osm += '\n <nd ref="%s"/>' % ref

import epdb; epdb.st()
import epdb

epdb.st()
if "tags" in way:
for key, value in way["tags"].items():
if value is None:
Expand All @@ -211,7 +213,7 @@ def createWay(
newkey = escape(key)
newval = escape(str(value))
osm += f"\n <tag k='{newkey}' v='{newval}'/>"
if modified and key != 'note':
if modified and key != "note":
osm += '\n <tag k="note" v="Do not upload this without validation!"/>'
osm += "\n"

Expand Down Expand Up @@ -301,7 +303,7 @@ def createNode(
newkey = escape(key)
newval = escape(str(value))
osm += f"\n <tag k='{newkey}' v='{newval}'/>"
if modified and key != 'note':
if modified and key != "note":
osm += '\n <tag k="note" v="Do not upload this without validation!"/>'
osm += "\n </node>\n"
else:
Expand Down
1 change: 1 addition & 0 deletions tests/test_basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ def test_create():

assert hits == 2


if __name__ == "__main__":
test_create()

0 comments on commit fa77a1b

Please sign in to comment.