Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Automatic linting

Github-actions75b9175d8175
diff --git a/wger/__init__.py b/wger/__init__.py
index bd6b7bab1..54dfffc4a 100644
--- a/wger/__init__.py
+++ b/wger/__init__.py
@@ -7,6 +7,7 @@
# Local
from .celery_configuration import app
+
MIN_APP_VERSION = (1, 6, 0, 'final', 1)
VERSION = (2, 2, 0, 'alpha', 4)
diff --git a/wger/nutrition/management/commands/import-off-products.py b/wger/nutrition/management/commands/import-off-products.py
index e9475d37b..6d82b8a1c 100644
--- a/wger/nutrition/management/commands/import-off-products.py
+++ b/wger/nutrition/management/commands/import-off-products.py
@@ -25,6 +25,7 @@ from wger.core.models import Language
from wger.nutrition.models import Ingredient
from wger.nutrition.off import extract_info_from_off
+
logger = logging.getLogger(__name__)
@@ -56,8 +57,8 @@ class Command(BaseCommand):
dest='mode',
type=str,
help='Script mode, "insert" or "update". Insert will insert the ingredients as new '
- 'entries in the database, while update will try to update them if they are '
- 'already present. Deault: insert'
+ 'entries in the database, while update will try to update them if they are '
+ 'already present. Deault: insert'
)
parser.add_argument(
'--completeness',
@@ -66,7 +67,7 @@ class Command(BaseCommand):
dest='completeness',
type=float,
help='Completeness threshold for importing the products. Products in OFF have '
- 'completeness score that ranges from 0 to 1.1. Default: 0.7'
+ 'completeness score that ranges from 0 to 1.1. Default: 0.7'
)
def handle(self, **options):
diff --git a/wger/nutrition/models/ingredient.py b/wger/nutrition/models/ingredient.py
index c84523b14..55554a7ab 100644
--- a/wger/nutrition/models/ingredient.py
+++ b/wger/nutrition/models/ingredient.py
@@ -65,6 +65,7 @@ from wger.utils.models import (
# Local
from .ingredient_category import IngredientCategory
+
logger = logging.getLogger(__name__)
diff --git a/wger/nutrition/off.py b/wger/nutrition/off.py
index df713f974..2654432d0 100644
--- a/wger/nutrition/off.py
+++ b/wger/nutrition/off.py
@@ -13,7 +13,11 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-from dataclasses import dataclass, asdict
+# Standard Library
+from dataclasses import (
+ asdict,
+ dataclass,
+)
from typing import Optional
# wger
@@ -22,6 +26,7 @@ from wger.nutrition.models import Source
from wger.utils.constants import ODBL_LICENSE_ID
from wger.utils.models import AbstractSubmissionModel
+
OFF_REQUIRED_TOP_LEVEL = [
'product_name',
'code',
diff --git a/wger/nutrition/tests/test_off.py b/wger/nutrition/tests/test_off.py
index 314511724..fcb49e496 100644
--- a/wger/nutrition/tests/test_off.py
+++ b/wger/nutrition/tests/test_off.py
@@ -18,8 +18,8 @@ from django.test import SimpleTestCase
# wger
from wger.nutrition.off import (
+ IngredientData,
extract_info_from_off,
- IngredientData
)
from wger.utils.constants import ODBL_LICENSE_ID
from wger.utils.models import AbstractSubmissionModel