From 94ea3a1f30e9fc5fa136634c88a2d25d49cda3a7 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Sun, 2 Apr 2023 17:00:32 +0000 Subject: [PATCH] Missed PyLint errors --- gallery/routes/groups.py | 6 +++--- gallery/utils/metadata/__init__.py | 3 ++- gallery/utils/metadata/helpers.py | 2 +- setup/configuration.py | 1 - 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gallery/routes/groups.py b/gallery/routes/groups.py index 528b192..48def48 100644 --- a/gallery/routes/groups.py +++ b/gallery/routes/groups.py @@ -54,7 +54,7 @@ def group(group_id): group = (db_session.query(db.Groups) .filter(db.Groups.id == group_id) .first()) - + if group is None: abort(404, 'Group not found! D:') @@ -108,8 +108,8 @@ def group_post(group_id, image_id): # Get all groups the image is in groups = (db_session.query(db.GroupJunction.group_id) - .filter(db.GroupJunction.post_id == image_id) - .all()) + .filter(db.GroupJunction.post_id == image_id) + .all()) # Get the group data for each group the image is in image.groups = [] diff --git a/gallery/utils/metadata/__init__.py b/gallery/utils/metadata/__init__.py index 3ad50e5..89c2a63 100644 --- a/gallery/utils/metadata/__init__.py +++ b/gallery/utils/metadata/__init__.py @@ -67,13 +67,14 @@ class Metadata: } # Thanks chatGPT xP + # pylint: disable=E0602 for key, value in encoded_exif.items(): for mapping_name, mapping_val in EXIF_MAPPING: if key in mapping_val: if len(mapping_val[key]) == 2: exif[mapping_name][mapping_val[key][0]] = { 'raw': value, - 'formatted': getattr(helpers, mapping_val[key][1])(value), # pylint: disable=E0602 + 'formatted': getattr(helpers, mapping_val[key][1])(value), } else: exif[mapping_name][mapping_val[key][0]] = { diff --git a/gallery/utils/metadata/helpers.py b/gallery/utils/metadata/helpers.py index 2509d8e..bbac087 100644 --- a/gallery/utils/metadata/helpers.py +++ b/gallery/utils/metadata/helpers.py @@ -59,7 +59,7 @@ def exposure(value): """ Formats the exposure value into a standard format """ - return str(value) + 'EV' + return str(value) + 'EV' def color_space(value): diff --git a/setup/configuration.py b/setup/configuration.py index 1fa6e90..6f7cf74 100644 --- a/setup/configuration.py +++ b/setup/configuration.py @@ -3,7 +3,6 @@ OnlyLegs - Setup Runs when the app detects that there is no user directory """ import os -import sys import logging import re import platformdirs