Skip to content

Commit 0d52fa3

Browse files
committed
Fix async function defs
1 parent 6021fc9 commit 0d52fa3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

geojson_aoi/_async/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def strip_featcol(geojson_obj: GeoJSON | Feature | FeatureCollection) -> list[Ge
143143
return geoms
144144

145145

146-
def parse_aoi_async(
146+
async def parse_aoi_async(
147147
db: str | AsyncConnection, geojson_raw: str | bytes | dict, merge: bool = False
148148
) -> FeatureCollection:
149149
"""Parse a GeoJSON file or data struc into a normalized FeatureCollection.
@@ -204,7 +204,7 @@ def parse_aoi_async(
204204
# Strip away any geom type that isn't a Polygon
205205
geoms = [geom for geom in geoms if geom["type"] == "Polygon"]
206206

207-
with AsyncPostGis(db, geoms, merge) as result:
207+
async with AsyncPostGis(db, geoms, merge) as result:
208208
# Remove any properties that AsyncPostGIS might have assigned.
209209
for feature in result.featcol["features"]:
210210
feature.pop("properties", None)

0 commit comments

Comments
 (0)