Self hosted FLOSS fitness/workout, nutrition and weight tracker
Remove unused imports and other fixes
Roland Geideraf834cfe56df
diff --git a/wger/core/api/views.py b/wger/core/api/views.pyindex 2abe8cdc7..b5d1d6702 100644--- a/wger/core/api/views.py+++ b/wger/core/api/views.py@@ -53,7 +53,6 @@ from wger import (MIN_APP_VERSION,get_version,)-from wger.core.api.permissions import AllowRegisterUserfrom wger.core.api.serializers import (DaysOfWeekSerializer,LanguageSerializer,diff --git a/wger/core/management/commands/clear-cache.py b/wger/core/management/commands/clear-cache.pyindex 99b916144..6db46d13a 100644--- a/wger/core/management/commands/clear-cache.py+++ b/wger/core/management/commands/clear-cache.py@@ -21,10 +21,7 @@ from django.core.management.base import ()# wger-from wger.manager.models import (- Workout,- WorkoutLog,-)+from wger.manager.models import WorkoutLogfrom wger.utils.cache import reset_workout_logdiff --git a/wger/core/management/commands/dummy-generator-users.py b/wger/core/management/commands/dummy-generator-users.pyindex 19ffccc89..912fafe5c 100644--- a/wger/core/management/commands/dummy-generator-users.py+++ b/wger/core/management/commands/dummy-generator-users.py@@ -92,7 +92,7 @@ class Command(BaseCommand):# Even with the uuid part, usernames are not guaranteed to be unique,# in this case, just ignore and continue- except IntegrityError as e:+ except IntegrityError:continueif gym_list:diff --git a/wger/core/management/commands/extract-i18n-flutter-exercises.py b/wger/core/management/commands/extract-i18n-flutter-exercises.pyindex 49ddc9ee3..dda770932 100644--- a/wger/core/management/commands/extract-i18n-flutter-exercises.py+++ b/wger/core/management/commands/extract-i18n-flutter-exercises.py@@ -92,4 +92,4 @@ class Command(BaseCommand):# Write to outputwith open('screenshots_exercises.dart', 'w') as f:f.write('\n'.join(out))- self.stdout.write(self.style.SUCCESS(f'Wrote content to screenshots_exercises.dart'))+ self.stdout.write(self.style.SUCCESS('Wrote content to screenshots_exercises.dart'))diff --git a/wger/core/management/commands/extract-i18n.py b/wger/core/management/commands/extract-i18n.pyindex 70f538ef3..055ee9aae 100644--- a/wger/core/management/commands/extract-i18n.py+++ b/wger/core/management/commands/extract-i18n.py@@ -68,7 +68,7 @@ class Command(BaseCommand):for i in data:out += f'{{% translate "{i}" %}}\n'f.write(out)- self.stdout.write(self.style.SUCCESS(f'Wrote content to wger/i18n.tpl'))+ self.stdout.write(self.style.SUCCESS('Wrote content to wger/i18n.tpl'))## React - copy the file to src/i18n.tsx in the React repo@@ -93,7 +93,7 @@ class Command(BaseCommand):return (<p></p>);};"""f.write(out)- self.stdout.write(self.style.SUCCESS(f'Wrote content to wger/i18n.tsx'))+ self.stdout.write(self.style.SUCCESS('Wrote content to wger/i18n.tsx'))## Flutter - copy content to the end of lib/l10n/app_en.arb in the flutter repo@@ -102,10 +102,10 @@ class Command(BaseCommand):for i in data:out += f'"{cleanup_name(i.__str__())}": "{i}",\n'out += f'"@{cleanup_name(i.__str__())}": {{ \n'- out += f'"description": "Generated entry for translation for server strings"\n'+ out += '"description": "Generated entry for translation for server strings"\n'out += '},\n'f.write(out)- self.stdout.write(self.style.SUCCESS(f'Wrote content to app_en.arb'))+ self.stdout.write(self.style.SUCCESS('Wrote content to app_en.arb'))# Copy to lib/helpers/i18n.dart in the flutter repowith open('wger/i18n.dart', 'w') as f:diff --git a/wger/core/migrations/0006_auto_20151025_2237.py b/wger/core/migrations/0006_auto_20151025_2237.pyindex f1989f8d5..6d682f7fc 100644--- a/wger/core/migrations/0006_auto_20151025_2237.py+++ b/wger/core/migrations/0006_auto_20151025_2237.py@@ -1,6 +1,6 @@# -*- coding: utf-8 -*--from django.db import migrations, models+from django.db import migrationsdef create_usercache(apps, schema_editor):diff --git a/wger/core/migrations/0009_auto_20160303_2340.py b/wger/core/migrations/0009_auto_20160303_2340.pyindex 081c07d67..20f2e7c58 100644--- a/wger/core/migrations/0009_auto_20160303_2340.py+++ b/wger/core/migrations/0009_auto_20160303_2340.py@@ -1,6 +1,6 @@# -*- coding: utf-8 -*--from django.db import migrations, models+from django.db import migrationsdef insert_data(apps, schema_editor):diff --git a/wger/core/templatetags/wger_extras.py b/wger/core/templatetags/wger_extras.pyindex c9c0e563d..500476a28 100644--- a/wger/core/templatetags/wger_extras.py+++ b/wger/core/templatetags/wger_extras.py@@ -28,7 +28,6 @@ from django.utils.translation import (# wgerfrom wger.core.tests.base_testcase import get_reverse-from wger.manager.models import Dayfrom wger.utils.constants import (PAGINATION_MAX_TOTAL_PAGES,PAGINATION_PAGES_AROUND_CURRENT,diff --git a/wger/core/tests/test_generator.py b/wger/core/tests/test_generator.pyindex efa497236..a8cb7e84c 100644--- a/wger/core/tests/test_generator.py+++ b/wger/core/tests/test_generator.py@@ -18,7 +18,6 @@ from django.core.management import call_command# wgerfrom wger.core.tests.base_testcase import WgerTestCase-from wger.gym.models import Gymclass UserGeneratorTestCase(WgerTestCase):diff --git a/wger/core/tests/test_user.py b/wger/core/tests/test_user.pyindex 059fe05c9..d0e061bc9 100644--- a/wger/core/tests/test_user.py+++ b/wger/core/tests/test_user.py@@ -13,7 +13,6 @@# You should have received a copy of the GNU Affero General Public License# Standard Libraryimport datetime-from unittest import TestCase# Djangofrom django.contrib.auth.models import Userdiff --git a/wger/core/tests/test_user_rest_registration.py b/wger/core/tests/test_user_rest_registration.pyindex 28353c54b..fefdd5f63 100644--- a/wger/core/tests/test_user_rest_registration.py+++ b/wger/core/tests/test_user_rest_registration.py@@ -11,7 +11,6 @@ from rest_framework.authtoken.models import Tokenfrom rest_framework.status import (HTTP_201_CREATED,HTTP_400_BAD_REQUEST,- HTTP_403_FORBIDDEN,)# wgerdiff --git a/wger/exercises/management/commands/change-exercise-author.py b/wger/exercises/management/commands/change-exercise-author.pyindex c55e65eb4..e5670b8ad 100644--- a/wger/exercises/management/commands/change-exercise-author.py+++ b/wger/exercises/management/commands/change-exercise-author.py@@ -82,7 +82,7 @@ class Command(BaseCommand):exercise.license_author = author_nameexercise.save()- self.stdout.write(self.style.SUCCESS(f'Exercise and/or translation has been updated'))+ self.stdout.write(self.style.SUCCESS('Exercise and/or translation has been updated'))def print_error(self, error_message):self.stdout.write(self.style.WARNING(f'{error_message}'))diff --git a/wger/exercises/management/commands/read-exercise-cleanup.py b/wger/exercises/management/commands/read-exercise-cleanup.pyindex 697ad5f87..770b1e874 100644--- a/wger/exercises/management/commands/read-exercise-cleanup.py+++ b/wger/exercises/management/commands/read-exercise-cleanup.py@@ -117,7 +117,7 @@ class Command(BaseCommand):#new_base = base_uuid == UUID_NEWif not options['create_on_new'] and new_base:- self.stdout.write(f' Skipping creating new exercise base...\n')+ self.stdout.write(' Skipping creating new exercise base...\n')continuebase = (@@ -237,7 +237,7 @@ class Command(BaseCommand):self.stdout.write(self.style.SUCCESS(message))if '(imported from Feeel)' in exercise_author:- exercise_author = re.sub('\(imported from Feeel\)', '', exercise_author)+ exercise_author = re.sub(r'\(imported from Feeel\)', '', exercise_author)for author in exercise_author.split(','):author = author.strip()author = f'{author} (imported from Feeel)'@@ -245,7 +245,7 @@ class Command(BaseCommand):if len(author) >= 60:self.stdout.write(self.style.WARNING(- f' Author name is longer than 60 characters, skipping...'+ ' Author name is longer than 60 characters, skipping...'))continue@@ -264,7 +264,7 @@ class Command(BaseCommand):csv_file = open('exercises_cleanup_duplicates.csv', 'r', newline='')file_reader = csv.DictReader(csv_file)self.stdout.write(- self.style.WARNING(f'---> Deleting duplicate bases and translations now...')+ self.style.WARNING('---> Deleting duplicate bases and translations now...'))for row in file_reader:diff --git a/wger/exercises/migrations/0029_full_text_search.py b/wger/exercises/migrations/0029_full_text_search.pyindex 7a4a1e52f..50ad1d17b 100644--- a/wger/exercises/migrations/0029_full_text_search.py+++ b/wger/exercises/migrations/0029_full_text_search.py@@ -2,7 +2,7 @@import django.contrib.postgres.searchfrom django.contrib.postgres.operations import TrigramExtension, BtreeGinExtension-from django.db import migrations, models+from django.db import migrationsclass Migration(migrations.Migration):diff --git a/wger/exercises/models/video.py b/wger/exercises/models/video.pyindex 07ba6e8b2..024b75dbd 100644--- a/wger/exercises/models/video.py+++ b/wger/exercises/models/video.py@@ -68,7 +68,7 @@ def validate_video(value):try:ffmpeg.probe(value.file.temporary_file_path())- except ffmpeg.Error as e:+ except ffmpeg.Error:raise ValidationError(_('File is not a valid video'))diff --git a/wger/gym/migrations/0002_auto_20151003_1944.py b/wger/gym/migrations/0002_auto_20151003_1944.pyindex ff20c20b0..fc9121d29 100644--- a/wger/gym/migrations/0002_auto_20151003_1944.py+++ b/wger/gym/migrations/0002_auto_20151003_1944.py@@ -2,7 +2,6 @@from django.db import models, migrationsfrom django.conf import settings-import datetimeclass Migration(migrations.Migration):diff --git a/wger/gym/migrations/0006_auto_20160214_1013.py b/wger/gym/migrations/0006_auto_20160214_1013.pyindex 6c07037ad..55440f1d4 100644--- a/wger/gym/migrations/0006_auto_20160214_1013.py+++ b/wger/gym/migrations/0006_auto_20160214_1013.py@@ -1,6 +1,6 @@# -*- coding: utf-8 -*--from django.db import migrations, models+from django.db import migrationsdef update_permission_names(apps, schema_editor):diff --git a/wger/manager/api/serializers.py b/wger/manager/api/serializers.pyindex 13a87c203..780e23c92 100644--- a/wger/manager/api/serializers.py+++ b/wger/manager/api/serializers.py@@ -18,10 +18,7 @@from rest_framework import serializers# wger-from wger.manager.api.consts import (- BASE_CONFIG_FIELDS,- BASE_CONFIG_FILTER_FIELDS,-)+from wger.manager.api.consts import BASE_CONFIG_FIELDSfrom wger.manager.api.validators import validate_requirementsfrom wger.manager.models import (Day,diff --git a/wger/manager/config_calculations/calculations.py b/wger/manager/config_calculations/calculations.pyindex 1417eafb8..006706019 100644--- a/wger/manager/config_calculations/calculations.py+++ b/wger/manager/config_calculations/calculations.py@@ -19,7 +19,6 @@ from abc import (ABC,abstractmethod,)-from decimal import Decimal# wgerfrom wger.manager.dataclasses import SetConfigDatadiff --git a/wger/manager/dataclasses.py b/wger/manager/dataclasses.pyindex e1a0b48d6..fe01ce562 100644--- a/wger/manager/dataclasses.py+++ b/wger/manager/dataclasses.py@@ -39,7 +39,6 @@ from wger.core.models import (RepetitionUnit,WeightUnit,)-from wger.utils.helpers import normalize_decimal@dataclassdiff --git a/wger/manager/migrations/0002_auto_20150202_2040.py b/wger/manager/migrations/0002_auto_20150202_2040.pyindex df9258b47..4e76e3065 100644--- a/wger/manager/migrations/0002_auto_20150202_2040.py+++ b/wger/manager/migrations/0002_auto_20150202_2040.py@@ -1,6 +1,6 @@# -*- coding: utf-8 -*--from django.db import models, migrations+from django.db import migrationsfrom sortedm2m.operations import AlterSortedManyToManyFieldimport sortedm2m.fieldsdiff --git a/wger/manager/migrations/0007_auto_20160311_2258.py b/wger/manager/migrations/0007_auto_20160311_2258.pyindex 354aa836d..ed52e50ae 100644--- a/wger/manager/migrations/0007_auto_20160311_2258.py+++ b/wger/manager/migrations/0007_auto_20160311_2258.py@@ -1,6 +1,6 @@# -*- coding: utf-8 -*--from django.db import migrations, models+from django.db import migrationsdef convert_logs(apps, schema_editor):diff --git a/wger/manager/models/day.py b/wger/manager/models/day.pyindex e89988c64..d5dc3ba7e 100644--- a/wger/manager/models/day.py+++ b/wger/manager/models/day.py@@ -23,7 +23,6 @@ from django.db import modelsfrom django.utils.translation import gettext_lazy as _# wger-from wger.core.models import DaysOfWeekfrom wger.manager.dataclasses import SlotDatadiff --git a/wger/manager/models/rir_config.py b/wger/manager/models/rir_config.pyindex 16d16bd82..b8882b346 100644--- a/wger/manager/models/rir_config.py+++ b/wger/manager/models/rir_config.py@@ -18,7 +18,6 @@from django.db import models# wger-from wger.manager.consts import RIR_OPTIONSfrom wger.manager.models import AbstractChangeConfigdiff --git a/wger/manager/models/workout.py b/wger/manager/models/workout.pyindex 8626b85bb..0a0718932 100644--- a/wger/manager/models/workout.py+++ b/wger/manager/models/workout.py@@ -16,7 +16,6 @@# Djangofrom django.contrib.auth.models import User-from django.core.cache import cachefrom django.core.exceptions import ValidationErrorfrom django.db import modelsfrom django.urls import reversediff --git a/wger/manager/tests/test_pdf.py b/wger/manager/tests/test_pdf.pyindex b297ea4c1..534d8b2b7 100644--- a/wger/manager/tests/test_pdf.py+++ b/wger/manager/tests/test_pdf.py@@ -13,7 +13,6 @@# You should have received a copy of the GNU Affero General Public License# Django-from django.contrib.auth.models import Userfrom django.urls import reverse# wgerdiff --git a/wger/manager/tests/test_slot.py b/wger/manager/tests/test_slot.pyindex 359acafd8..9512710e9 100644--- a/wger/manager/tests/test_slot.py+++ b/wger/manager/tests/test_slot.py@@ -12,8 +12,6 @@## You should have received a copy of the GNU Affero General Public License-# Standard Library-from decimal import Decimal# wgerfrom wger.core.tests.base_testcase import WgerTestCasediff --git a/wger/manager/urls.py b/wger/manager/urls.pyindex 3bf45a3ae..48581d5c1 100644--- a/wger/manager/urls.py+++ b/wger/manager/urls.py@@ -28,6 +28,7 @@ from wger.manager.views import (workout,)+# sub patterns for workout logspatterns_log = [path(@@ -77,7 +78,6 @@ patterns_workout = [workout.WorkoutMarkAsTemplateView.as_view(),name='make-template',),-]# sub patterns for workoutsdiff --git a/wger/manager/views/ical.py b/wger/manager/views/ical.pyindex b610172c3..baa9e925a 100644--- a/wger/manager/views/ical.py+++ b/wger/manager/views/ical.py@@ -15,7 +15,6 @@# You should have received a copy of the GNU Affero General Public License# Standard Library-import datetimeimport logging# Djangodiff --git a/wger/manager/views/workout.py b/wger/manager/views/workout.pyindex 393168495..745c8bd65 100644--- a/wger/manager/views/workout.py+++ b/wger/manager/views/workout.py@@ -15,9 +15,7 @@# You should have received a copy of the GNU Affero General Public License# Standard Library-import copyimport logging-from typing import List# Djangofrom django.contrib.auth.decorators import login_required@@ -36,9 +34,7 @@ from django.views.generic import UpdateView# wgerfrom wger.manager.forms import WorkoutMakeTemplateFormfrom wger.manager.models import (- AbstractChangeConfig,Routine,- SlotEntry,Workout,)from wger.utils.generic_views import WgerFormMixindiff --git a/wger/measurements/models/measurement.py b/wger/measurements/models/measurement.pyindex dcecad700..90cdfd034 100644--- a/wger/measurements/models/measurement.py+++ b/wger/measurements/models/measurement.py@@ -18,7 +18,6 @@import datetime# Django-from django.contrib.auth.models import Userfrom django.core.validators import (MaxValueValidator,MinValueValidator,diff --git a/wger/nutrition/dataclasses.py b/wger/nutrition/dataclasses.pyindex d87408b9f..606a0a70b 100644--- a/wger/nutrition/dataclasses.py+++ b/wger/nutrition/dataclasses.py@@ -45,7 +45,7 @@ class IngredientData:def sanity_checks(self):if not self.name:- raise ValueError(f'Name is empty!')+ raise ValueError('Name is empty!')self.name = self.name[:200]self.brand = self.brand[:200]self.common_name = self.common_name[:200]@@ -65,7 +65,7 @@ class IngredientData:raise ValueError(f'Value for {macro} is greater than 100: {value}')if self.carbohydrates + self.protein + self.fat > 100:- raise ValueError(f'Total of carbohydrates, protein and fat is greater than 100!')+ raise ValueError('Total of carbohydrates, protein and fat is greater than 100!')def dict(self):return asdict(self)diff --git a/wger/nutrition/forms.py b/wger/nutrition/forms.pyindex 1e3539180..13e6aaecc 100644--- a/wger/nutrition/forms.py+++ b/wger/nutrition/forms.py@@ -45,7 +45,6 @@ from wger.nutrition.models import (Ingredient,IngredientWeightUnit,LogItem,- Meal,MealItem,)from wger.utils.widgets import Html5NumberInputdiff --git a/wger/nutrition/management/commands/import-off-products.py b/wger/nutrition/management/commands/import-off-products.pyindex ffad7af79..8b74f09ef 100644--- a/wger/nutrition/management/commands/import-off-products.py+++ b/wger/nutrition/management/commands/import-off-products.py@@ -70,7 +70,7 @@ class Command(ImportProductCommand):for product in db.products.find({'lang': {'$in': list(languages.keys())}}):try:ingredient_data = extract_info_from_off(product, languages[product['lang']])- except (KeyError, ValueError) as e:+ except (KeyError, ValueError):# self.stdout.write(f'--> KeyError while extracting info from OFF: {e}')self.counter['skipped'] += 1else:@@ -141,11 +141,11 @@ class Command(ImportProductCommand):self.stdout.write('Importing entries from Open Food Facts')self.stdout.write(f' - {self.mode}')if options['delta_updates']:- self.stdout.write(f' - importing only delta updates')+ self.stdout.write(' - importing only delta updates')elif options['use_jsonl']:- self.stdout.write(f' - importing the full dump')+ self.stdout.write(' - importing the full dump')else:- self.stdout.write(f' - importing from mongo')+ self.stdout.write(' - importing from mongo')self.stdout.write('')languages = {lang.short_name: lang.pk for lang in Language.objects.all()}diff --git a/wger/nutrition/management/products.py b/wger/nutrition/management/products.pyindex c7197bb96..e9a96cb27 100644--- a/wger/nutrition/management/products.py+++ b/wger/nutrition/management/products.py@@ -168,11 +168,11 @@ class ImportProductCommand(BaseCommand):for line in gzid:try:product = json.loads(line)- if not product.get('lang') in languages:+ if product.get('lang') not in languages:continueyield productexcept JSONDecodeError:- self.stdout.write(f' Error parsing and/or filtering json record, skipping')+ self.stdout.write(' Error parsing and/or filtering json record, skipping')continuedef download_file(self, url: str, destination: str) -> None:diff --git a/wger/nutrition/migrations/0020_full_text_search.py b/wger/nutrition/migrations/0020_full_text_search.pyindex bb779690f..6e57f07b7 100644--- a/wger/nutrition/migrations/0020_full_text_search.py+++ b/wger/nutrition/migrations/0020_full_text_search.py@@ -2,7 +2,7 @@import django.contrib.postgres.indexesimport django.contrib.postgres.search-from django.db import migrations, models+from django.db import migrationsclass Migration(migrations.Migration):diff --git a/wger/nutrition/models/image.py b/wger/nutrition/models/image.pyindex 00877b077..8136cd6b6 100644--- a/wger/nutrition/models/image.py+++ b/wger/nutrition/models/image.py@@ -23,7 +23,6 @@ from django.db import modelsfrom django.utils.translation import gettext_lazy as _# wger-from wger.core.models import Licensefrom wger.utils.helpers import BaseImagefrom wger.utils.models import AbstractLicenseModeldiff --git a/wger/nutrition/models/plan.py b/wger/nutrition/models/plan.pyindex 8cea374fb..bebc4923c 100644--- a/wger/nutrition/models/plan.py+++ b/wger/nutrition/models/plan.py@@ -17,7 +17,6 @@# Standard Libraryimport datetimeimport logging-from decimal import Decimal# Djangofrom django.contrib.auth.models import User@@ -30,7 +29,6 @@ from django.utils.translation import gettext_lazy as _from wger.nutrition.consts import ENERGY_FACTORfrom wger.nutrition.helpers import NutritionalValuesfrom wger.utils.cache import cache_mapper-from wger.utils.constants import TWOPLACESfrom wger.weight.models import WeightEntrydiff --git a/wger/nutrition/tests/test_nutritional_calculations.py b/wger/nutrition/tests/test_nutritional_calculations.pyindex 0bcc745fa..4d0e38ef0 100644--- a/wger/nutrition/tests/test_nutritional_calculations.py+++ b/wger/nutrition/tests/test_nutritional_calculations.py@@ -20,7 +20,6 @@ from decimal import Decimal# wgerfrom wger.core.tests.base_testcase import WgerTestCasefrom wger.nutrition import models-from wger.utils.constants import TWOPLACESlogger = logging.getLogger(__name__)diff --git a/wger/nutrition/urls.py b/wger/nutrition/urls.pyindex 97c94c2ed..828a2ab80 100644--- a/wger/nutrition/urls.py+++ b/wger/nutrition/urls.py@@ -18,10 +18,7 @@# Djangofrom django.conf.urls import includefrom django.contrib.auth.decorators import login_required-from django.urls import (- path,- re_path,-)+from django.urls import path# wgerfrom wger.core.views.react import ReactViewdiff --git a/wger/nutrition/usda.py b/wger/nutrition/usda.pyindex 9e14bd213..befdbe28c 100644--- a/wger/nutrition/usda.py+++ b/wger/nutrition/usda.py@@ -91,7 +91,7 @@ def extract_info_from_usda(product_data: dict, language: int) -> IngredientData:# License and author infosource_name = Source.USDA.value- source_url = f'https://fdc.nal.usda.gov/'+ source_url = 'https://fdc.nal.usda.gov/'author = ('U.S. Department of Agriculture, Agricultural Research Service, ''Beltsville Human Nutrition Research Center. FoodData Central.'diff --git a/wger/nutrition/views/plan.py b/wger/nutrition/views/plan.pyindex 785ba2fe7..ec63ec2f4 100644--- a/wger/nutrition/views/plan.py+++ b/wger/nutrition/views/plan.py@@ -50,6 +50,7 @@ from wger.utils.pdf import (styleSheet,)+logger = logging.getLogger(__name__)diff --git a/wger/utils/helpers.py b/wger/utils/helpers.pyindex a3f6cb701..a0e9e99e3 100644--- a/wger/utils/helpers.py+++ b/wger/utils/helpers.py@@ -27,16 +27,13 @@ from functools import wraps# Djangofrom django.contrib.auth.models import User-from django.contrib.auth.tokens import default_token_generatorfrom django.core.files import Filefrom django.core.files.temp import NamedTemporaryFilefrom django.http import Http404from django.shortcuts import get_object_or_404from django.utils.encoding import force_bytes-from django.utils.http import (- urlsafe_base64_decode,- urlsafe_base64_encode,-)+from django.utils.http import urlsafe_base64_encode+logger = logging.getLogger(__name__)diff --git a/wger/weight/migrations/0002_auto_20150604_2139.py b/wger/weight/migrations/0002_auto_20150604_2139.pyindex 34007a62d..7f7595a38 100644--- a/wger/weight/migrations/0002_auto_20150604_2139.py+++ b/wger/weight/migrations/0002_auto_20150604_2139.py@@ -1,6 +1,6 @@# -*- coding: utf-8 -*--from django.db import models, migrations+from django.db import migrationsclass Migration(migrations.Migration):diff --git a/wger/weight/tests/test_entry.py b/wger/weight/tests/test_entry.pyindex 8af3955d0..d186316bf 100644--- a/wger/weight/tests/test_entry.py+++ b/wger/weight/tests/test_entry.py@@ -16,9 +16,6 @@import datetimeimport decimal-# Django-from django.urls import reverse-# wgerfrom wger.core.tests import api_base_testfrom wger.core.tests.base_testcase import (diff --git a/wger/weight/views.py b/wger/weight/views.pyindex 25d764896..c9dd8b38e 100644--- a/wger/weight/views.py+++ b/wger/weight/views.py@@ -26,7 +26,6 @@ from django.http import (HttpResponse,HttpResponseRedirect,)-from django.shortcuts import renderfrom django.urls import reversefrom django.utils.translation import (gettext as _,@@ -46,7 +45,6 @@ from wger.utils.generic_views import (WgerDeleteMixin,WgerFormMixin,)-from wger.utils.helpers import check_accessfrom wger.weight import helpersfrom wger.weight.forms import WeightFormfrom wger.weight.models import WeightEntry