A few linting fixes.
This commit is contained in:
parent
2fb3b67fde
commit
d1148d85db
5 changed files with 5 additions and 6 deletions
|
@ -4,7 +4,6 @@ codebase but don't deserve to be methods of any class.
|
|||
'''
|
||||
import datetime
|
||||
import hashlib
|
||||
import math
|
||||
import mimetypes
|
||||
import os
|
||||
import PIL.Image
|
||||
|
|
|
@ -225,6 +225,7 @@ class GroupableMixin(metaclass=abc.ABCMeta):
|
|||
'memberid': member.id,
|
||||
}
|
||||
self.photodb.sql_delete(table=self.group_table, pairs=pairs)
|
||||
|
||||
@abc.abstractmethod
|
||||
def remove_child(self, member):
|
||||
return self.__remove_child(member)
|
||||
|
@ -877,7 +878,6 @@ class Photo(ObjectBase):
|
|||
return None
|
||||
return hms.seconds_to_hms(self.duration)
|
||||
|
||||
#@decorators.time_me
|
||||
@decorators.required_feature('photo.generate_thumbnail')
|
||||
@decorators.transaction
|
||||
def generate_thumbnail(self, **special):
|
||||
|
@ -1076,7 +1076,6 @@ class Photo(ObjectBase):
|
|||
|
||||
self.duration = probe.audio.duration
|
||||
|
||||
#@decorators.time_me
|
||||
@decorators.required_feature('photo.reload_metadata')
|
||||
@decorators.transaction
|
||||
def reload_metadata(self):
|
||||
|
@ -1208,7 +1207,7 @@ class Photo(ObjectBase):
|
|||
new_path = old_path.parent.with_child(new_filename)
|
||||
else:
|
||||
new_path = pathclass.Path(new_filename)
|
||||
#new_path.correct_case()
|
||||
|
||||
if (new_path.parent != old_path.parent) and not move:
|
||||
raise ValueError('Cannot move the file without param move=True.')
|
||||
|
||||
|
|
|
@ -534,6 +534,7 @@ def tag_expression_matcher_builder(frozen_children):
|
|||
(tag.name if not isinstance(tag, str) else tag): children
|
||||
for (tag, children) in frozen_children.items()
|
||||
}
|
||||
|
||||
def match_function(photo_tags, tagname):
|
||||
'''
|
||||
Used as the `match_function` for the ExpressionTree evaluation.
|
||||
|
|
|
@ -207,6 +207,8 @@ def easybake_argparse(args):
|
|||
photodb = find_photodb()
|
||||
for eb_string in args.eb_strings:
|
||||
notes = photodb.easybake(eb_string)
|
||||
for (action, tagname) in notes:
|
||||
print(action, tagname)
|
||||
|
||||
if args.autoyes or interactive.getpermission('Commit?'):
|
||||
photodb.commit()
|
||||
|
|
|
@ -2,8 +2,6 @@ import argparse
|
|||
import os
|
||||
import sys
|
||||
|
||||
from voussoirkit import sqlhelpers
|
||||
|
||||
import etiquette
|
||||
|
||||
class Migrator:
|
||||
|
|
Loading…
Reference in a new issue