Skip to content

Commit

Permalink
Type fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWags committed Apr 16, 2024
1 parent be9e8ca commit 587e81f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions shapeworks_cloud/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Dataset(TimeStampedModel, models.Model):
publications = models.TextField(blank=True, default='')

def get_contents(self):
ret = []
ret = [] # type: ignore

def truncate_filename(filename):
return filename.split('/')[-1]
Expand All @@ -45,9 +45,9 @@ def truncate_anatomy(anatomy_type):
label = 'image_'
if shape.subject.name in [s['name'] for s in ret]: # type: ignore
subject = next(
(s for s in ret if s['name'] == shape.subject.name), None
) # type: ignore
subject[label + anatomy] = truncate_filename(shape.file.name)
(s for s in ret if s['name'] == shape.subject.name), None # type: ignore
)
subject[label + anatomy] = truncate_filename(shape.file.name) # type: ignore
else:
subject = {
'name': shape.subject.name, # type: ignore
Expand Down

0 comments on commit 587e81f

Please sign in to comment.