unify ICUNameProcessorRules and ICURuleLoader

There is no need for the additional layer of indirection that
the ICUNameProcessorRules class adds. The ICURuleLoader can
fill the database properties directly.
This commit is contained in:
Sarah Hoffmann
2021-09-29 17:37:04 +02:00
parent 5e5addcdbf
commit 16daa57e47
14 changed files with 123 additions and 137 deletions

View File

@@ -149,11 +149,14 @@ class AbstractTokenizer(ABC):
@abstractmethod
def init_from_project(self) -> None:
def init_from_project(self, config: Configuration) -> None:
""" Initialise the tokenizer from an existing database setup.
The function should load all previously saved configuration from
the project directory and/or the property table.
Arguments:
config: Read-only object with configuration options.
"""
pass
@@ -187,7 +190,7 @@ class AbstractTokenizer(ABC):
@abstractmethod
def check_database(self) -> str:
def check_database(self, config: Configuration) -> str:
""" Check that the database is set up correctly and ready for being
queried.
@@ -196,6 +199,9 @@ class AbstractTokenizer(ABC):
description of the issue as well as hints for the user on
how to resolve the issue.
Arguments:
config: Read-only object with configuration options.
Return `None`, if no issue was found.
"""
pass