Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#211)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 23.10.1 → 23.11.0](psf/black@23.10.1...23.11.0)
- [github.com/astral-sh/ruff-pre-commit: v0.1.4 → v0.1.5](astral-sh/ruff-pre-commit@v0.1.4...v0.1.5)
- [github.com/pre-commit/mirrors-prettier: v3.0.3 → v3.1.0](pre-commit/mirrors-prettier@v3.0.3...v3.1.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Nov 14, 2023
1 parent 09d14d1 commit 40c7a45
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ repos:

# Autoformat: Python code
- repo: https://github.com/psf/black
rev: 23.10.1
rev: 23.11.0
hooks:
- id: black

# Lint / autoformat: Python code
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: "v0.1.4"
rev: "v0.1.5"
hooks:
- id: ruff
args: [--exit-non-zero-on-fix]

# Autoformat: YAML, JSON, Markdown, etc.
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v3.1.0
hooks:
- id: prettier
args: [--ignore-unknown, --no-error-on-unmatched-pattern, "!chart/**"]
Expand Down
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 40c7a45

Please sign in to comment.