mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-01-01 12:26:13 +00:00
Missed PyLint errors
This commit is contained in:
parent
7b97b8e0ef
commit
94ea3a1f30
|
@ -54,7 +54,7 @@ def group(group_id):
|
||||||
group = (db_session.query(db.Groups)
|
group = (db_session.query(db.Groups)
|
||||||
.filter(db.Groups.id == group_id)
|
.filter(db.Groups.id == group_id)
|
||||||
.first())
|
.first())
|
||||||
|
|
||||||
if group is None:
|
if group is None:
|
||||||
abort(404, 'Group not found! D:')
|
abort(404, 'Group not found! D:')
|
||||||
|
|
||||||
|
@ -108,8 +108,8 @@ def group_post(group_id, image_id):
|
||||||
|
|
||||||
# Get all groups the image is in
|
# Get all groups the image is in
|
||||||
groups = (db_session.query(db.GroupJunction.group_id)
|
groups = (db_session.query(db.GroupJunction.group_id)
|
||||||
.filter(db.GroupJunction.post_id == image_id)
|
.filter(db.GroupJunction.post_id == image_id)
|
||||||
.all())
|
.all())
|
||||||
|
|
||||||
# Get the group data for each group the image is in
|
# Get the group data for each group the image is in
|
||||||
image.groups = []
|
image.groups = []
|
||||||
|
|
|
@ -67,13 +67,14 @@ class Metadata:
|
||||||
}
|
}
|
||||||
|
|
||||||
# Thanks chatGPT xP
|
# Thanks chatGPT xP
|
||||||
|
# pylint: disable=E0602
|
||||||
for key, value in encoded_exif.items():
|
for key, value in encoded_exif.items():
|
||||||
for mapping_name, mapping_val in EXIF_MAPPING:
|
for mapping_name, mapping_val in EXIF_MAPPING:
|
||||||
if key in mapping_val:
|
if key in mapping_val:
|
||||||
if len(mapping_val[key]) == 2:
|
if len(mapping_val[key]) == 2:
|
||||||
exif[mapping_name][mapping_val[key][0]] = {
|
exif[mapping_name][mapping_val[key][0]] = {
|
||||||
'raw': value,
|
'raw': value,
|
||||||
'formatted': getattr(helpers, mapping_val[key][1])(value), # pylint: disable=E0602
|
'formatted': getattr(helpers, mapping_val[key][1])(value),
|
||||||
}
|
}
|
||||||
else:
|
else:
|
||||||
exif[mapping_name][mapping_val[key][0]] = {
|
exif[mapping_name][mapping_val[key][0]] = {
|
||||||
|
|
|
@ -59,7 +59,7 @@ def exposure(value):
|
||||||
"""
|
"""
|
||||||
Formats the exposure value into a standard format
|
Formats the exposure value into a standard format
|
||||||
"""
|
"""
|
||||||
return str(value) + 'EV'
|
return str(value) + 'EV'
|
||||||
|
|
||||||
|
|
||||||
def color_space(value):
|
def color_space(value):
|
||||||
|
|
|
@ -3,7 +3,6 @@ OnlyLegs - Setup
|
||||||
Runs when the app detects that there is no user directory
|
Runs when the app detects that there is no user directory
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import logging
|
import logging
|
||||||
import re
|
import re
|
||||||
import platformdirs
|
import platformdirs
|
||||||
|
|
Loading…
Reference in a new issue