Skip to content

Commit

Permalink
codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Zhavoronkov committed Mar 30, 2020
1 parent 05c379e commit a35fde9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cvat/apps/engine/media_extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def get_preview(self):
def get_progress(self, pos):
pass

def _get_preview(self, obj):
@staticmethod
def _get_preview(obj):
if isinstance(obj, io.IOBase):
preview = Image.open(obj)
else:
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/migrations/0024_auto_20191023_1025.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def migrate_task_data(db_task_id, db_data_id, original_video, original_images, s
else:
original_chunk_writer = ZipChunkWriter(100)
compressed_chunk_writer = ZipCompressedChunkWriter(image_quality)

counter = itertools.count()
generator = itertools.groupby(reader, lambda x: next(counter) // chunk_size)
for chunk_idx, chunk_images in generator:
Expand Down

0 comments on commit a35fde9

Please sign in to comment.