diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-01-16 21:37:09 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-01-16 21:37:09 +0100 |
commit | 05a841215c82ef40d4679dfc4d2c26572bd4d349 (patch) | |
tree | 9888ae0bd2345816d1ab479dd34b4c6b902c158a /bsie/extractor/generic/constant.py | |
parent | 057e09d6537bf5c39815661a75819081e3e5fda7 (diff) | |
parent | 58aaa864f9747d27c065739256d4c6635ca9b751 (diff) | |
download | bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.tar.gz bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.tar.bz2 bsie-05a841215c82ef40d4679dfc4d2c26572bd4d349.zip |
Merge branch 'mb/feature' into develop
Diffstat (limited to 'bsie/extractor/generic/constant.py')
-rw-r--r-- | bsie/extractor/generic/constant.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/bsie/extractor/generic/constant.py b/bsie/extractor/generic/constant.py index 11384e6..938e20c 100644 --- a/bsie/extractor/generic/constant.py +++ b/bsie/extractor/generic/constant.py @@ -4,13 +4,15 @@ Part of the bsie module. A copy of the license is provided with the project. Author: Matthias Baumgartner, 2022 """ -# imports +# standard imports import typing # bsie imports -from bsie.base import extractor from bsie.utils import bsfs, node +# inner-module imports +from .. import base + # exports __all__: typing.Sequence[str] = ( 'Constant', @@ -19,7 +21,7 @@ __all__: typing.Sequence[str] = ( ## code ## -class Constant(extractor.Extractor): +class Constant(base.Extractor): """Extract information from file's path.""" CONTENT_READER = None @@ -32,7 +34,7 @@ class Constant(extractor.Extractor): schema: str, tuples: typing.Iterable[typing.Tuple[bsfs.URI, typing.Any]], ): - super().__init__(bsfs.schema.Schema.from_string(extractor.SCHEMA_PREAMBLE + schema)) + super().__init__(bsfs.schema.from_string(base.SCHEMA_PREAMBLE + schema)) # NOTE: Raises a KeyError if the predicate is not part of the schema self._tuples = tuple((self.schema.predicate(p_uri), value) for p_uri, value in tuples) # TODO: use schema instance for value checking |