Skip to content

Commit

Permalink
chore: apply refurb suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
RaczeQ committed Dec 28, 2023
1 parent c2b846c commit b406276
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quackosm/_geo_arrow_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
def read_geoparquet_table(*args, **kwargs):
"""Read GeoParquet using PyArrow."""
tab = _pq.read_table(*args, **kwargs)
tab_metadata = tab.schema.metadata if tab.schema.metadata else {}
tab_metadata = tab.schema.metadata or {}
if b"geo" in tab_metadata:
geo_meta = json.loads(tab_metadata[b"geo"])
else:
Expand Down Expand Up @@ -72,7 +72,7 @@ def write_geoparquet_table(
),
)

metadata = table.schema.metadata if table.schema.metadata else {}
metadata = table.schema.metadata or {}
metadata["geo"] = json.dumps(geo_meta)
table = table.replace_schema_metadata(metadata)
return _pq.write_table(table, *args, **kwargs)
Expand Down

0 comments on commit b406276

Please sign in to comment.