Skip to content

Commit

Permalink
fix typing issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Jul 3, 2024
1 parent f088e8f commit 8f47cd7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ianalyzer_readers/extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def __init__(self, *predicates: Iterable[URIRef], node_type: str = 'object', mul
self.is_collection = is_collection
super().__init__(**kwargs)

def _apply(self, graph: Graph = None, subject: BNode = None, *nargs, **kwargs) -> Union[str, list[str]]:
def _apply(self, graph: Graph = None, subject: BNode = None, *nargs, **kwargs) -> Union[str, List[str]]:
''' apply a query to the RDFReader's graph, with one subject resulting from the `document_subjects` function
Parameters:
graph: a graph in which to query (set on RDFReader)
Expand All @@ -635,7 +635,7 @@ def _apply(self, graph: Graph = None, subject: BNode = None, *nargs, **kwargs) -
return [self.get_node_value(node) for node in nodes]
return self.get_node_value(nodes[0])

def _select(self, graph, subject, predicates: Iterable[URIRef]) -> list[Union[Literal | URIRef | BNode]]:
def _select(self, graph, subject, predicates: Iterable[URIRef]) -> List[Union[Literal | URIRef | BNode]]:
''' search in a graph with predicates
if more than one predicate is passed, this is a recursive query:
the first search result of the query is used as a subject in the next query
Expand Down

0 comments on commit 8f47cd7

Please sign in to comment.