Skip to content

Commit

Permalink
Remove parse
Browse files Browse the repository at this point in the history
  • Loading branch information
webb-ben committed Sep 13, 2024
1 parent 91a8df8 commit 7d3caf8
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions pygeoapi_plugins/provider/sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def _combine(self, properties, results):
for k, v in results.items():
# Join query results by key
values = [
self.parse(item.get('value') if isinstance(item, dict) else item)
item.get('value') if isinstance(item, dict) else item
for item in (v if isinstance(v, list) else [v])
]
# Return item or list of items
Expand Down Expand Up @@ -398,18 +398,6 @@ def delete(self, identifier):
def __repr__(self):
return f'<SPARQLProvider> {self.data}'

@staticmethod
def parse(value: str) -> list:
"""
Parse a string by splitting it on commas.
:param value: `str` to be parsed.
:returns: A `list` of strings if commas are present,
otherwise the original string.
"""
return value.split(',') if ',' in value else value

@staticmethod
def combine_lists(dict_data: dict):
"""
Expand Down

0 comments on commit 7d3caf8

Please sign in to comment.