diff --git a/setup.cfg b/setup.cfg index b1f8902f..3785daaf 100644 --- a/setup.cfg +++ b/setup.cfg @@ -6,12 +6,12 @@ name = otoole description = A Python toolkit to support use of OSeMOSYS author = Will Usher -author-email = wusher@kth.se +author_email = wusher@kth.se license = mit -long-description = file: README.rst -long-description-content-type = text/x-rst; charset=UTF-8 +long_description = file: README.rst +long_description_content_type = text/x-rst; charset=UTF-8 url = https://github.com/OSeMOSYS/otoole -project-urls = +project_urls = Documentation = https://otoole.readthedocs.io/en/latest/?badge=latest # Change if running only on Windows, Mac or Linux (comma-separated) platforms = any diff --git a/src/otoole/utils.py b/src/otoole/utils.py index 99b8f146..c87dd1ac 100644 --- a/src/otoole/utils.py +++ b/src/otoole/utils.py @@ -1,10 +1,9 @@ import json import os -from typing import Dict, List, Union - from datapackage import Package from sqlalchemy import create_engine -from yaml import SafeLoader, load +from typing import Dict, List, Union +from yaml import SafeLoader, load # type: ignore try: import importlib.resources as resources @@ -15,9 +14,9 @@ def _read_file(open_file, ending): if ending == ".yaml" or ending == ".yml": - contents = load(open_file, Loader=SafeLoader) + contents = load(open_file, Loader=SafeLoader) # typing: Dict elif ending == ".json": - contents = json.load(open_file) + contents = json.load(open_file) # typing: Dict else: contents = open_file.readlines() return contents