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