Skip to content

Commit

Permalink
style: reformat whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
annehaley committed Oct 25, 2024
1 parent 58f5d9a commit ee9b5c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions uvdat/core/tasks/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ def convert_dataset(
dataset.save()

# remove any existing generated files
generated_files = FileItem.objects.filter(
dataset=dataset,
metadata__generated=True
).delete()
generated_files = FileItem.objects.filter(dataset=dataset, metadata__generated=True).delete()

if dataset.dataset_type == dataset.DatasetType.RASTER:
RasterMapLayer.objects.filter(dataset=dataset).delete()
Expand Down
6 changes: 2 additions & 4 deletions uvdat/core/tasks/map_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def split_raster_zip(file_item, style_options):
archive_file.write(file_item.file.open('rb').read())
# unzip all
with zipfile.ZipFile(archive_path) as zip_archive:
zip_archive.extractall(extracted_path)
zip_archive.extractall(extracted_path)
# read VRT files
vrt_files = list(extracted_path.glob('**/*.vrt'))
vrt_files.sort() # rely on filenames for ordering
Expand All @@ -88,9 +88,7 @@ def split_raster_zip(file_item, style_options):
metadata=metadata,
)
with open(cog_filepath, 'rb') as cog:
new_file_item.file.save(
cog_filepath, ContentFile(cog.read())
)
new_file_item.file.save(cog_filepath, ContentFile(cog.read()))
if cog_size > 0:
create_raster_map_layer(new_file_item, style_options)

Expand Down

0 comments on commit ee9b5c1

Please sign in to comment.