Skip to content

Commit

Permalink
Automatic linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Github-actions committed Oct 16, 2023
1 parent a9aa607 commit 427bce7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 22 deletions.
4 changes: 2 additions & 2 deletions wger/core/models/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@ def user_bodyweight(self, weight):
"""
if (
not WeightEntry.objects.filter(user=self.user).exists() or (
datetime.date.today() - WeightEntry.objects.filter(user=self.user).latest().date >
datetime.timedelta(days=3)
datetime.date.today() - WeightEntry.objects.filter(user=self.user).latest().date
> datetime.timedelta(days=3)
)
):
entry = WeightEntry()
Expand Down
9 changes: 5 additions & 4 deletions wger/core/views/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
# Standard Library
import logging

# Third Party
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit

# Django
from django.conf import settings
from django.contrib import messages
Expand All @@ -38,6 +34,10 @@
from django.utils.translation import gettext as _
from django.views.generic.edit import FormView

# Third Party
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit

# wger
from wger.core.demo import (
create_demo_entries,
Expand All @@ -50,6 +50,7 @@
from wger.core.models import DaysOfWeek
from wger.manager.models import Schedule


logger = logging.getLogger(__name__)


Expand Down
20 changes: 4 additions & 16 deletions wger/nutrition/models/plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,13 @@ class Meta:
)
"""Flag to indicate that the nutritional plan will only used for logging"""

goal_energy = models.IntegerField(
null=True,
default=None
)
goal_energy = models.IntegerField(null=True, default=None)

goal_protein = models.IntegerField(
null=True,
default=None
)
goal_protein = models.IntegerField(null=True, default=None)

goal_carbohydrates = models.IntegerField(
null=True,
default=None
)
goal_carbohydrates = models.IntegerField(null=True, default=None)

goal_fat = models.IntegerField(
null=True,
default=None
)
goal_fat = models.IntegerField(null=True, default=None)

has_goal_calories = models.BooleanField(
verbose_name=_('Use daily calories'),
Expand Down

0 comments on commit 427bce7

Please sign in to comment.