Automatic linting

This commit is contained in:
Github-actions
2026-01-18 11:22:18 +00:00
parent 421ea60d1d
commit bc061acfdc
15 changed files with 29 additions and 28 deletions

View File

@@ -72,7 +72,6 @@ INSTALLED_APPS = [
'wger.gallery',
'wger.measurements',
'wger.trophies',
# reCaptcha support, see https://github.com/praekelt/django-recaptcha
'django_recaptcha',
# The sitemaps app

View File

@@ -17,18 +17,6 @@
# Standard Library
from datetime import date
# Third Party
from crispy_forms.helper import FormHelper
from crispy_forms.layout import (
HTML,
ButtonHolder,
Column,
Fieldset,
Layout,
Row,
Submit,
)
# Django
from django import forms
from django.contrib.auth import authenticate
@@ -47,10 +35,20 @@ from django.forms import (
)
from django.utils.translation import (
gettext as _,
)
from django.utils.translation import (
gettext_lazy,
)
# Third Party
from crispy_forms.helper import FormHelper
from crispy_forms.layout import (
HTML,
ButtonHolder,
Column,
Fieldset,
Layout,
Row,
Submit,
)
from django_recaptcha.fields import ReCaptchaField
from django_recaptcha.widgets import ReCaptchaV3
@@ -342,4 +340,3 @@ class RegistrationFormNoCaptcha(UserCreationForm, UserEmailForm):
css_class='text-center',
),
)

View File

@@ -35,6 +35,7 @@ from wger.core.views import (
)
from wger.core.views.react import ReactView
# sub patterns for languages
patterns_language = [
path(

View File

@@ -22,9 +22,7 @@ from django.conf import settings
from django.contrib import messages
from django.contrib.auth import login as django_login
from django.http import HttpResponseRedirect
from django.urls import (
reverse,
)
from django.urls import reverse
from django.utils.translation import gettext as _
# wger
@@ -33,6 +31,7 @@ from wger.core.demo import (
create_temporary_user,
)
logger = logging.getLogger(__name__)

View File

@@ -22,6 +22,7 @@ from django.db import models
from django.templatetags.static import static
from django.utils.translation import gettext_lazy as _
logger = logging.getLogger(__name__)

View File

@@ -17,15 +17,15 @@
# Standard Library
import uuid
# Third Party
import bleach
# Django
from django.contrib.postgres.indexes import GinIndex
from django.core.validators import MinLengthValidator
from django.db import models
from django.urls import reverse
from django.utils.text import slugify
# Third Party
import bleach
from simple_history.models import HistoricalRecords
# wger

View File

@@ -29,6 +29,7 @@ from simple_history.models import HistoricalRecords
# wger
from wger.utils.cache import reset_exercise_api_cache
try:
# Third Party
import ffmpeg
@@ -42,6 +43,7 @@ from wger.utils.models import (
AbstractLicenseModel,
)
MAX_FILE_SIZE_MB = 100

View File

@@ -53,6 +53,7 @@ from wger.manager.models import (
)
from wger.utils.cache import CacheKeyMapper
logger = logging.getLogger(__name__)

View File

@@ -58,6 +58,7 @@ from wger.utils.language import load_language
from wger.utils.models import AbstractLicenseModel
from wger.utils.requests import wger_user_agent
logger = logging.getLogger(__name__)

View File

@@ -24,6 +24,7 @@ from django.db import models
from .ingredient import Ingredient
from .weight_unit import WeightUnit
logger = logging.getLogger(__name__)

View File

@@ -67,10 +67,7 @@ class LogItem(BaseMealItem, models.Model):
The meal this log belongs to (optional)
"""
datetime = models.DateTimeField(
verbose_name='Date and Time (Approx.)',
default=timezone.now
)
datetime = models.DateTimeField(verbose_name='Date and Time (Approx.)', default=timezone.now)
"""
Time and date when the log was added
"""

View File

@@ -27,6 +27,7 @@ from wger.utils.fields import Html5TimeField
from ..helpers import NutritionalValues
from .plan import NutritionPlan
logger = logging.getLogger(__name__)

View File

@@ -33,6 +33,7 @@ from .ingredient import Ingredient
from .ingredient_weight_unit import IngredientWeightUnit
from .meal import Meal
logger = logging.getLogger(__name__)

View File

@@ -30,6 +30,7 @@ from wger.nutrition.helpers import NutritionalValues
from wger.utils.cache import cache_mapper
from wger.weight.models import WeightEntry
logger = logging.getLogger(__name__)

View File

@@ -33,8 +33,6 @@ from django.urls import reverse_lazy
from django.utils.decorators import method_decorator
from django.utils.translation import (
gettext as _,
)
from django.utils.translation import (
gettext_lazy,
)
from django.views.decorators.cache import cache_page
@@ -59,6 +57,7 @@ from wger.utils.generic_views import (
)
from wger.utils.language import load_language
logger = logging.getLogger(__name__)