Fix minor linting issues.

This commit is contained in:
Christopher C. Wells 2019-02-02 19:17:25 -08:00
parent a47767355d
commit efc613c637
3 changed files with 4 additions and 4 deletions

View File

@ -43,7 +43,7 @@
| | | | | | | | | | | (_) | |
| '--------------' | '--------------' | '--------------' | '--------------' |
'----------------' '----------------' '----------------' '----------------'
"""
""" # noqa
__title__ = 'Baby Buddy'
__version__ = '1.2.0'

View File

@ -119,7 +119,7 @@ class Command(BaseCommand):
"""
method = choice(models.Feeding._meta.get_field('method').choices)[0]
amount = None
if method is 'bottle':
if method == 'bottle':
amount = Decimal('%d.%d' % (randint(0, 6), randint(0, 9)))
start = self.time + timedelta(minutes=randint(1, 60))
end = start + timedelta(minutes=randint(5, 20))

View File

@ -14,10 +14,10 @@ def duration_string(duration, precision='s'):
duration = '{} hour{}'.format(h, 's' if h > 1 else '')
if m > 0 and precision != 'h':
duration += '{}{} minute{}'.format(
'' if duration is '' else ', ', m, 's' if m > 1 else '')
'' if duration == '' else ', ', m, 's' if m > 1 else '')
if s > 0 and precision != 'h' and precision != 'm':
duration += '{}{} second{}'.format(
'' if duration is '' else ', ', s, 's' if s > 1 else '')
'' if duration == '' else ', ', s, 's' if s > 1 else '')
return duration