Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fix pep8 formatting errors

Roland Geiderc523f7cd9af9
diff --git a/wger/core/models.py b/wger/core/models.py
index e2c7e80ef..56b018e84 100644
--- a/wger/core/models.py
+++ b/wger/core/models.py
@@ -303,9 +303,11 @@ by the US Department of Agriculture. It is extremely complete, with around
default=False)
'''Allow anonymous read-only access'''
-
- num_days_weight_reminder = models.IntegerField(verbose_name=_('Automatic reminders for weight entries'),
- help_text=_('Number of days after the last weight entry (enter 0 to deactivate)'),
+ num_days_weight_reminder = models.IntegerField(verbose_name=_('Automatic reminders for weight '
+ 'entries'),
+ help_text=_('Number of days after the last '
+ 'weight entry (enter 0 to '
+ 'deactivate)'),
max_length=30,
default=0)
''' Number of Days Reminder Weight '''
diff --git a/wger/manager/management/commands/email-weight-reminder.py b/wger/manager/management/commands/email-weight-reminder.py
index ed17c8e74..c7b9f0635 100644
--- a/wger/manager/management/commands/email-weight-reminder.py
+++ b/wger/manager/management/commands/email-weight-reminder.py
@@ -43,12 +43,10 @@ class Command(BaseCommand):
# Onl continue if the user has provided an email address.
# Checking it here so we check for NULL values and emtpy strings
- #print("Checking User RWeight Reminder")
if not profile.user.email:
continue
today = datetime.datetime.now().date()
- #print(today)
try:
last_entry = WeightEntry.objects.filter(user=profile.user).latest().creation_date
@@ -59,7 +57,6 @@ class Command(BaseCommand):
except WeightEntry.DoesNotExist:
pass
-
@staticmethod
def send_email(user, last_entry):
'''
diff --git a/wger/manager/tests/test_email_weight_reminder.py b/wger/manager/tests/test_email_weight_reminder.py
index 9e0bf1ce9..c6c673514 100644
--- a/wger/manager/tests/test_email_weight_reminder.py
+++ b/wger/manager/tests/test_email_weight_reminder.py
@@ -12,7 +12,7 @@
#
# You should have received a copy of the GNU Affero General Public License
-from datetime import date, timedelta, datetime
+from datetime import date, timedelta, datetime
from django.core.management import call_command
from django.core import mail
@@ -20,6 +20,7 @@ from django.contrib.auth.models import User
from wger.manager.tests.testcase import WorkoutManagerTestCase
from wger.weight.models import WeightEntry
+
class EmailWeightReminderTestCase(WorkoutManagerTestCase):
def test_without_email(self):
user = User.objects.get(pk=2)
@@ -95,4 +96,4 @@ class EmailWeightReminderTestCase(WorkoutManagerTestCase):
user.userprofile.save()
call_command("email-weight-reminder")
- self.assertEqual(len(mail.outbox), 0)
\ No newline at end of file
+ self.assertEqual(len(mail.outbox), 0)