Skip to content

Commit

Permalink
Rename choices() to resize_mode_choices()
Browse files Browse the repository at this point in the history
Clarifying what's being referred to
  • Loading branch information
lukeyeager committed Jul 10, 2015
1 parent ac17266 commit 9c75400
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion digits/dataset/images/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ class ImageDatasetForm(DatasetForm):
)
resize_mode = wtforms.SelectField(u'Resize Transformation',
default='squash',
choices=ImageDatasetJob.choices()
choices=ImageDatasetJob.resize_mode_choices()
)
4 changes: 2 additions & 2 deletions digits/dataset/images/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def __init__(self, image_dims, resize_mode, **kwargs):
self.resize_mode = resize_mode

@staticmethod
def choices():
def resize_mode_choices():
return [
('crop', 'Crop'),
('squash', 'Squash'),
Expand All @@ -32,6 +32,6 @@ def choices():
]

def resize_mode_name(self):
c = dict(self.choices())
c = dict(self.resize_mode_choices())
return c[self.resize_mode]

0 comments on commit 9c75400

Please sign in to comment.