Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Automatic linting

Github-actions15b5dce51ac3
diff --git a/wger/exercises/management/commands/read-exercise-cleanup.py b/wger/exercises/management/commands/read-exercise-cleanup.py
index f9afb75af..8e3294c3e 100644
--- a/wger/exercises/management/commands/read-exercise-cleanup.py
+++ b/wger/exercises/management/commands/read-exercise-cleanup.py
@@ -38,6 +38,7 @@ from wger.exercises.models import (
)
from wger.utils.constants import DEFAULT_LICENSE_ID
+
UUID_NEW = 'NEW'
VIDEO_AUTHOR = 'Goulart'
VIDEO_PATH = pathlib.Path('videos-tmp')
@@ -91,8 +92,8 @@ class Command(BaseCommand):
for language in [l.short_name for l in languages]:
for column in columns:
name = '{0}:{1}'.format(language, column)
- assert (name in file_reader.fieldnames), '{0} not in {1}'.format(name,
- file_reader.fieldnames)
+ assert (name in file_reader.fieldnames
+ ), '{0} not in {1}'.format(name, file_reader.fieldnames)
default_license = License.objects.get(pk=DEFAULT_LICENSE_ID)
@@ -200,8 +201,10 @@ class Command(BaseCommand):
continue
translation = Exercise.objects.get_or_create(
- uuid=exercise_uuid,
- defaults={'exercise_base': base, 'language': language}
+ uuid=exercise_uuid, defaults={
+ 'exercise_base': base,
+ 'language': language
+ }
)[0] if not new_translation else Exercise()
translation.exercise_base = base
translation.language = language
diff --git a/wger/exercises/management/commands/sync-exercises.py b/wger/exercises/management/commands/sync-exercises.py
index 67557c87e..11aa5493f 100644
--- a/wger/exercises/management/commands/sync-exercises.py
+++ b/wger/exercises/management/commands/sync-exercises.py
@@ -38,6 +38,7 @@ from wger.exercises.models import (
Muscle,
)
+
EXERCISE_API = "{0}/api/v2/exercisebaseinfo/?limit=100"
DELETION_LOG_API = "{0}/api/v2/deletion-log/?limit=100"
CATEGORY_API = "{0}/api/v2/exercisecategory/"