Skip to content

Commit

Permalink
style: remove unneeded code #260
Browse files Browse the repository at this point in the history
  • Loading branch information
MRichards99 committed Dec 20, 2021
1 parent 9ee5395 commit cba6482
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions datagateway_api/src/search_api/panosc_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class PaNOSCMappings:
def __init__(
self, path=Path(__file__).parent.parent.parent / "search_api_mapping.json",
):
"""Load contents of `search_api_mapping.json` into this class"""
try:
with open(path, encoding="utf-8") as target:
self.mappings = json.load(target)
Expand Down Expand Up @@ -44,15 +45,4 @@ def get_panosc_related_entity_name(
return panosc_related_entity_name


# TODO - don't think I'll need this
def load_mappings(path=Path(__file__).parent.parent.parent / "search_api_mapping.json"):
try:
with open(path, encoding="utf-8") as target:
data = json.load(target)
except IOError as e:
raise SearchAPIError(e)

return data


mappings = PaNOSCMappings()

0 comments on commit cba6482

Please sign in to comment.