From 5dc4f309fd9ed6962699773ab5ccfe7daf4391f1 Mon Sep 17 00:00:00 2001 From: Dima Gerasimov Date: Mon, 1 Apr 2019 18:34:34 +0100 Subject: [PATCH] kython, remove old ci script --- ci.sh | 10 ---------- photos/__init__.py | 5 ++--- photos/__main__.py | 2 +- 3 files changed, 3 insertions(+), 14 deletions(-) delete mode 100755 ci.sh diff --git a/ci.sh b/ci.sh deleted file mode 100755 index 0daaac3..0000000 --- a/ci.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -cd "$(this_dir)" || exit - -. ~/bash_ci - -ci_run mypy photos -ci_run pylint -E photos - -ci_report_errors diff --git a/photos/__init__.py b/photos/__init__.py index d2f920b..7bdb5bc 100644 --- a/photos/__init__.py +++ b/photos/__init__.py @@ -2,6 +2,7 @@ from datetime import datetime import itertools import os from os.path import join, basename +import json import re from typing import Tuple, Dict, Optional, NamedTuple, Iterator, Iterable, List @@ -12,8 +13,6 @@ import magic # type: ignore import PIL.Image # type: ignore from PIL.ExifTags import TAGS, GPSTAGS # type: ignore -from kython import json_load - import logging def get_logger(): return logging.getLogger('photo-provider') @@ -225,7 +224,7 @@ def iter_photos() -> Iterator[Photo]: if os.path.isfile(geof): j: Dict with open(geof, 'r') as fo: - j = json_load(fo) + j = json.load(fo) if 'name' in j: g = geolocator.geocode(j['name']) geo = (g.latitude, g.longitude) diff --git a/photos/__main__.py b/photos/__main__.py index 18502c4..09480ba 100644 --- a/photos/__main__.py +++ b/photos/__main__.py @@ -1,7 +1,7 @@ import logging logging.basicConfig(level=logging.INFO) -from kython.logging import setup_logzero +from kython.klogging import setup_logzero from photos import get_photos, iter_photos, get_logger