Recent updates of dev/ruff and dev/pylint dependencies led to new linting warnings. Pylint 3.2.0 introduced a new check `possibly-used-before-assignment`, which ensures variables are defined regardless of conditional statements. Some if/else branches were missing defaults. These have been fixed.
17 lines
496 B
Python
17 lines
496 B
Python
"""
|
|
Core application enums declaration
|
|
"""
|
|
|
|
from django.conf import global_settings, settings
|
|
from django.utils.translation import gettext_lazy as _
|
|
|
|
# Django sets `LANGUAGES` by default with all supported languages. We can use it for
|
|
# the choice of languages which should not be limited to the few languages active in
|
|
# the app.
|
|
# pylint: disable=no-member
|
|
ALL_LANGUAGES = getattr(
|
|
settings,
|
|
"ALL_LANGUAGES",
|
|
[(language, _(name)) for language, name in global_settings.LANGUAGES],
|
|
)
|