Skip to content

Commit 0edebcd

Browse files
committed
mypy fixes
1 parent a047ba1 commit 0edebcd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

backend/persister.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class BasePersister(Loggable):
3838
If persisting to a file, the output directory is created by config._make_output_path()
3939
"""
4040

41-
add_extension: str = "csv"
41+
extension: str = "csv"
4242

4343
def __init__(self):
4444
self.records = []
@@ -213,11 +213,7 @@ class GeoJSONPersister(BasePersister):
213213
extension = "geojson"
214214

215215
def _write(self, path: str, records: list):
216-
feature_collection = {
217-
"type": "FeatureCollection",
218-
"features": [],
219-
}
220-
216+
221217
features = [
222218
{
223219
"type": "Feature",
@@ -237,7 +233,10 @@ def _write(self, path: str, records: list):
237233
}
238234
for record in records
239235
]
240-
feature_collection["features"].extend(features)
236+
feature_collection = {
237+
"type": "FeatureCollection",
238+
"features": features
239+
}
241240

242241
with open(path, "w") as f:
243242
json.dump(feature_collection, f, indent=4)

0 commit comments

Comments
 (0)