From b96c6e2096c387b70e2a4c1f0bc53b6044a0dc6f Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Fri, 25 Nov 2022 14:36:27 +0100 Subject: decouple readers and extractors; use strings for reference and repeated type annotations --- bsie/extractor/generic/path.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bsie/extractor/generic/path.py') diff --git a/bsie/extractor/generic/path.py b/bsie/extractor/generic/path.py index f358a79..f346f97 100644 --- a/bsie/extractor/generic/path.py +++ b/bsie/extractor/generic/path.py @@ -24,7 +24,7 @@ __all__: typing.Sequence[str] = ( class Path(extractor.Extractor): """Extract information from file's path.""" - CONTENT_READER = bsie.reader.path.Path + CONTENT_READER = 'bsie.reader.path.Path' # mapping from predicate to handler function. _callmap: typing.Dict[schema.Predicate, typing.Callable[[str], typing.Any]] @@ -45,7 +45,7 @@ class Path(extractor.Extractor): def extract( self, subject: node.Node, - content: CONTENT_READER.CONTENT_TYPE, + content: str, predicates: typing.Iterable[schema.Predicate], ) -> typing.Iterator[typing.Tuple[node.Node, schema.Predicate, typing.Any]]: for pred in predicates: -- cgit v1.2.3