Skip to content

Commit

Permalink
Automatic linting
Browse files Browse the repository at this point in the history
  • Loading branch information
Github-actions committed Dec 5, 2023
1 parent e81e99e commit 75b9175
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
1 change: 1 addition & 0 deletions wger/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Local
from .celery_configuration import app


MIN_APP_VERSION = (1, 6, 0, 'final', 1)

VERSION = (2, 2, 0, 'alpha', 4)
Expand Down
7 changes: 4 additions & 3 deletions wger/nutrition/management/commands/import-off-products.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
from wger.nutrition.models import Ingredient
from wger.nutrition.off import extract_info_from_off


logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -56,8 +57,8 @@ def add_arguments(self, parser):
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',
Expand All @@ -66,7 +67,7 @@ def add_arguments(self, parser):
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):
Expand Down
1 change: 1 addition & 0 deletions wger/nutrition/models/ingredient.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
# Local
from .ingredient_category import IngredientCategory


logger = logging.getLogger(__name__)


Expand Down
7 changes: 6 additions & 1 deletion wger/nutrition/off.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,6 +26,7 @@
from wger.utils.constants import ODBL_LICENSE_ID
from wger.utils.models import AbstractSubmissionModel


OFF_REQUIRED_TOP_LEVEL = [
'product_name',
'code',
Expand Down
2 changes: 1 addition & 1 deletion wger/nutrition/tests/test_off.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

# 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
Expand Down

0 comments on commit 75b9175

Please sign in to comment.