PEP8 fix
This commit is contained in:
parent
af36de091e
commit
ad1cbefb15
|
@ -402,13 +402,13 @@ class ExifTool(object):
|
||||||
"an iterable of strings")
|
"an iterable of strings")
|
||||||
|
|
||||||
params = []
|
params = []
|
||||||
params_b = []
|
params_utf8 = []
|
||||||
for tag, value in tags.items():
|
for tag, value in tags.items():
|
||||||
params.append(u'-%s=%s' % (tag, value))
|
params.append(u'-%s=%s' % (tag, value))
|
||||||
|
|
||||||
params.extend(filenames)
|
params.extend(filenames)
|
||||||
params_b = [x.encode('utf-8') for x in params]
|
params_utf8 = [x.encode('utf-8') for x in params]
|
||||||
return self.execute(*params_b)
|
return self.execute(*params_utf8)
|
||||||
|
|
||||||
def set_tags(self, tags, filename):
|
def set_tags(self, tags, filename):
|
||||||
"""Writes the values of the specified tags for the given file.
|
"""Writes the values of the specified tags for the given file.
|
||||||
|
|
|
@ -2,15 +2,17 @@
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from future import standard_library
|
from future import standard_library
|
||||||
standard_library.install_aliases()
|
|
||||||
from past.utils import old_div
|
from past.utils import old_div
|
||||||
|
|
||||||
from os import path
|
from os import path
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
import fractions
|
|
||||||
|
standard_library.install_aliases() # noqa
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import urllib.request, urllib.parse, urllib.error
|
import urllib.request
|
||||||
|
import urllib.parse
|
||||||
|
import urllib.error
|
||||||
|
|
||||||
from elodie import constants
|
from elodie import constants
|
||||||
from elodie.localstorage import Db
|
from elodie.localstorage import Db
|
||||||
|
@ -77,7 +79,8 @@ def dms_to_decimal(degrees, minutes, seconds, direction=' '):
|
||||||
if(direction[0] in 'WSws'):
|
if(direction[0] in 'WSws'):
|
||||||
sign = -1
|
sign = -1
|
||||||
return (
|
return (
|
||||||
float(degrees) + old_div(float(minutes), 60) + old_div(float(seconds), 3600)
|
float(degrees) + old_div(float(minutes), 60) +
|
||||||
|
old_div(float(seconds), 3600)
|
||||||
) * sign
|
) * sign
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,10 +13,11 @@ are used to represent the actual files.
|
||||||
import mimetypes
|
import mimetypes
|
||||||
import os
|
import os
|
||||||
|
|
||||||
try:
|
try: # Py3k compatibility
|
||||||
basestring
|
basestring
|
||||||
except NameError:
|
except NameError:
|
||||||
basestring = str
|
basestring = (bytes, str)
|
||||||
|
|
||||||
|
|
||||||
class Base(object):
|
class Base(object):
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ are used to represent the actual files.
|
||||||
.. moduleauthor:: Jaisen Mathai <jaisen@jmathai.com>
|
.. moduleauthor:: Jaisen Mathai <jaisen@jmathai.com>
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from builtins import object
|
|
||||||
|
|
||||||
# load modules
|
# load modules
|
||||||
from elodie import constants
|
from elodie import constants
|
||||||
|
|
|
@ -6,7 +6,6 @@ image objects (JPG, DNG, etc.).
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from builtins import str
|
|
||||||
|
|
||||||
import imghdr
|
import imghdr
|
||||||
import os
|
import os
|
||||||
|
|
|
@ -7,9 +7,6 @@ objects (AVI, MOV, etc.).
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
from builtins import str
|
|
||||||
from builtins import object
|
|
||||||
from past.utils import old_div
|
|
||||||
|
|
||||||
# load modules
|
# load modules
|
||||||
from distutils.spawn import find_executable
|
from distutils.spawn import find_executable
|
||||||
|
|
|
@ -57,7 +57,6 @@ def test_get_date_taken():
|
||||||
audio = Audio(helper.get_file('audio.m4a'))
|
audio = Audio(helper.get_file('audio.m4a'))
|
||||||
date_taken = audio.get_date_taken()
|
date_taken = audio.get_date_taken()
|
||||||
|
|
||||||
print('%r' % date_taken)
|
|
||||||
assert date_taken == (2016, 1, 4, 5, 24, 15, 0, 19, 0), date_taken
|
assert date_taken == (2016, 1, 4, 5, 24, 15, 0, 19, 0), date_taken
|
||||||
|
|
||||||
def test_get_exiftool_attributes():
|
def test_get_exiftool_attributes():
|
||||||
|
|
Loading…
Reference in New Issue