Skip to content

Commit

Permalink
Fixed setup syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
willu47 committed Jul 6, 2022
1 parent 562b43f commit b1b8a8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
name = otoole
description = A Python toolkit to support use of OSeMOSYS
author = Will Usher
author-email = [email protected]
author_email = [email protected]
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
Expand Down
9 changes: 4 additions & 5 deletions src/otoole/utils.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down

0 comments on commit b1b8a8b

Please sign in to comment.