Self hosted FLOSS fitness/workout, nutrition and weight tracker
Automatic linting
Github-actions14979faeeda7
diff --git a/wger/manager/api/views.py b/wger/manager/api/views.pyindex 977dc0984..f62dd9922 100644--- a/wger/manager/api/views.py+++ b/wger/manager/api/views.py@@ -19,6 +19,7 @@from django.conf import settingsfrom django.core.cache import cachefrom django.db.models import Q+# Third Partyfrom rest_framework import viewsetsfrom rest_framework.decorators import actiondiff --git a/wger/nutrition/management/commands/sync-ingredients.py b/wger/nutrition/management/commands/sync-ingredients.pyindex 431e1f3e0..1d9d3f92c 100644--- a/wger/nutrition/management/commands/sync-ingredients.py+++ b/wger/nutrition/management/commands/sync-ingredients.py@@ -61,5 +61,5 @@ class Command(WgerCommand):self.remote_url,languages,self.style.SUCCESS,- show_progress_bar=True+ show_progress_bar=True,)diff --git a/wger/nutrition/sync.py b/wger/nutrition/sync.pyindex af06317ec..66f01acaf 100644--- a/wger/nutrition/sync.py+++ b/wger/nutrition/sync.py@@ -286,10 +286,7 @@ def sync_ingredients(ingredient_nr = 1page_nr = 1pbar = tqdm(- total=total_ingredients,- unit='ingredients',- desc='Syncing progress',- unit_scale=True+ total=total_ingredients, unit='ingredients', desc='Syncing progress', unit_scale=True)for data in get_paginated(url, headers=wger_headers()):uuid = data['uuid']@@ -297,10 +294,7 @@ def sync_ingredients(ingredient_data = extract_info_from_wger_api(data).dict()ingredient_data['uuid'] = uuid- Ingredient.objects.update_or_create(- uuid=uuid,- defaults=ingredient_data- )+ Ingredient.objects.update_or_create(uuid=uuid, defaults=ingredient_data)if show_progress_bar:pbar.update(1)diff --git a/wger/nutrition/tasks.py b/wger/nutrition/tasks.pyindex 0050e34f6..b8f648779 100644--- a/wger/nutrition/tasks.py+++ b/wger/nutrition/tasks.py@@ -19,13 +19,14 @@ from random import (randint,)-# Third Party-from celery import shared_task-from celery.schedules import crontab# Djangofrom django.conf import settingsfrom django.core.management import call_command+# Third Party+from celery import shared_task+from celery.schedules import crontab+# wgerfrom wger.celery_configuration import appfrom wger.nutrition.sync import (@@ -34,6 +35,7 @@ from wger.nutrition.sync import (sync_ingredients,)+logger = logging.getLogger(__name__)@@ -62,10 +64,7 @@ def sync_all_ingredients_task():"""Fetches the current ingredients from the default wger instance"""- sync_ingredients(- logger.info,- show_progress_bar=False- )+ sync_ingredients(logger.info, show_progress_bar=False)@app.task