From 67f3cd471aecd04d71999feda95fccf1797df85b Mon Sep 17 00:00:00 2001 From: Cedric Leporcq Date: Sun, 15 Aug 2021 09:48:11 +0200 Subject: [PATCH] Fix drop python 3.7 --- ordigi/geolocation.py | 10 +++------- ordigi/media.py | 1 - requirements.txt | 1 + 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ordigi/geolocation.py b/ordigi/geolocation.py index df867be..b595f3f 100644 --- a/ordigi/geolocation.py +++ b/ordigi/geolocation.py @@ -1,6 +1,4 @@ """Look up geolocation information for media objects.""" -from past.utils import old_div - from os import path @@ -53,12 +51,10 @@ def decimal_to_dms(decimal): def dms_to_decimal(degrees, minutes, seconds, direction=' '): sign = 1 - if(direction[0] in 'WSws'): + if direction[0] in 'WSws': sign = -1 - return ( - float(degrees) + old_div(float(minutes), 60) + - old_div(float(seconds), 3600) - ) * sign + + return (degrees + minutes / 60 + seconds / 3600) * sign def dms_string(decimal, type='latitude'): diff --git a/ordigi/media.py b/ordigi/media.py index 5e2d938..772cc8b 100644 --- a/ordigi/media.py +++ b/ordigi/media.py @@ -5,7 +5,6 @@ Media :class:`Media` class to get file metadata import logging import mimetypes import os -import six # load modules from dateutil.parser import parse diff --git a/requirements.txt b/requirements.txt index 5239586..49dc078 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ Send2Trash==1.3.0 configparser==3.5.0 tabulate==0.7.7 Pillow==8.0 +pyheif_pillow_opener=0.1 six==1.9