ats_utilities.checker.engine module

Module

engine.py

Copyright

Copyright (C) 2017 - 2026 Vladimir Roncevic <elektron.ronca@gmail.com> ats_utilities is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ats_utilities is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Info

Defines class Checker with attribute(s) and method(s). Concrete implementation of the ATS parameter(s) checker.

class ats_utilities.checker.engine.Checker(component_bundle: CheckerComponentBundle | None = None)[source]

Bases: IChecker

Defines class Checker with attribute(s) and method(s). Concrete implementation of the ATS parameter(s) checker. Mechanism for application, tool, or script parameters checker.

It defines:

attributes:
ERRORS - Marks error types for message reports.
_is_initialized - Indicates if the checker component is initialized (default False).
_format_validator - Validator for parameters format (default FormatValidator).
_type_validator - Validator for parameters type (default TypeValidator).
_context_provider - Provider for call context (default ContextProvider).
_check_reporter - Formatter for message reports (default CheckReporter).
methods:
__init__ - Initializes Checker constructor.
validates_parameters - Validates parameter(s) for method(s) or function(s).
is_initialized - Checks if checker component is initialized.
__str__ - Returns the ATS checker as string representation.
ERRORS

alias of ErrorChecker

_abc_impl = <_abc._abc_data object>
is_initialized() bool[source]

Checks if checker component is initialized.

Returns:

True (success) | False (fail)

Return type:

<bool>

Exceptions:

None.

validates_parameters(parameters: list[tuple[str, Any]] | None) tuple[str, int][source]

Validates parameters for method(s) or function(s).

Parameters:

parameters (<ParametersSpecs | None>) – Specification for parameters | None.

Returns:

Tuple of error message report and error id.

Return type:

<ValidationResult>

Exceptions:

None.