Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #211

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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()