Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Automatic linting

Github-actions7701367f02e9
diff --git a/wger/exercises/models/base.py b/wger/exercises/models/base.py
index 5e87c6055..756060a68 100644
--- a/wger/exercises/models/base.py
+++ b/wger/exercises/models/base.py
@@ -150,8 +150,8 @@ class ExerciseBase(AbstractLicenseModel, AbstractHistoryMixin, models.Model):
Warning(
'exercises without translations',
hint=f'There are {no_translations} exercises without translations, this will '
- 'cause problems! You can output or delete them with "python manage.py '
- 'exercises-health-check --help"',
+ 'cause problems! You can output or delete them with "python manage.py '
+ 'exercises-health-check --help"',
id='wger.W002',
)
)
@@ -180,8 +180,7 @@ class ExerciseBase(AbstractLicenseModel, AbstractHistoryMixin, models.Model):
The latest update datetime of all exercises, videos and images.
"""
return max(
- self.last_update,
- *[image.last_update for image in self.exerciseimage_set.all()],
+ self.last_update, *[image.last_update for image in self.exerciseimage_set.all()],
*[video.last_update for video in self.exercisevideo_set.all()],
*[translation.last_update for translation in self.exercises.all()],
datetime.datetime(1970, 1, 1, tzinfo=datetime.timezone.utc)
diff --git a/wger/exercises/sync.py b/wger/exercises/sync.py
index 7174a8592..d501b511b 100644
--- a/wger/exercises/sync.py
+++ b/wger/exercises/sync.py
@@ -284,6 +284,7 @@ def handle_deleted_entries(
style_fn=lambda x: x,
):
if not print_fn:
+
def print_fn(_):
return None
diff --git a/wger/manager/views/ical.py b/wger/manager/views/ical.py
index 0ef81804b..6c46d584c 100644
--- a/wger/manager/views/ical.py
+++ b/wger/manager/views/ical.py
@@ -44,6 +44,7 @@ from wger.utils.helpers import (
next_weekday,
)
+
logger = logging.getLogger(__name__)
"""
Exports workouts and schedules as an iCal file that can be imported to a