Automatic linting

This commit is contained in:
Github-actions
2023-11-26 12:58:50 +00:00
parent ae7d049af3
commit b529dd7346
2 changed files with 6 additions and 5 deletions

View File

@@ -523,8 +523,8 @@ by the US Department of Agriculture. It is extremely complete, with around
"""
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()

View File

@@ -25,6 +25,7 @@ from wger.core.models import Language
from wger.nutrition.models import Ingredient
from wger.nutrition.off import extract_info_from_off
logger = logging.getLogger(__name__)
@@ -56,8 +57,8 @@ class Command(BaseCommand):
dest='mode',
type=str,
help='Script mode, "insert" or "update". Insert will insert the ingredients as new '
'entries in the database, while update will try to update them if they are '
'already present. Deault: insert'
'entries in the database, while update will try to update them if they are '
'already present. Deault: insert'
)
parser.add_argument(
'--completeness',
@@ -66,7 +67,7 @@ class Command(BaseCommand):
dest='completeness',
type=float,
help='Completeness threshold for importing the products. Products in OFF have '
'completeness score that ranges from 0 to 1.1. Default: 0.7'
'completeness score that ranges from 0 to 1.1. Default: 0.7'
)
def handle(self, **options):