arelle.utils.validate.Decorator

See COPYRIGHT.md for copyright information.

Module Contents

Classes

Functions

validation

Decorator for registering plugin validations. At most one of disclosureSystems and excludeDisclosureSystems parameters may be provided. If neither is provided the rule applies to all disclosure systems.

_wrapStrWithList

getValidationAttributes

_setValidationAttributes

Data

API

arelle.utils.validate.Decorator.ValidationFunction: typing_extensions.TypeAlias

None

arelle.utils.validate.Decorator._VALIDATION_RULE_ATTRIBUTES_KEY

‘_ARELLE_VALIDATION_ATTRIBUTES’

arelle.utils.validate.Decorator.validation(hook: arelle.utils.PluginHooks.ValidationHook, disclosureSystems: str | list[str] | None = None, excludeDisclosureSystems: str | list[str] | None = None) Callable[[arelle.utils.validate.Decorator.ValidationFunction], arelle.utils.validate.Decorator.ValidationFunction]

Decorator for registering plugin validations. At most one of disclosureSystems and excludeDisclosureSystems parameters may be provided. If neither is provided the rule applies to all disclosure systems.

All validation plugin functions should begin with the prefix “rule”. For instance def rule05(...):. There is a test that checks all validation plugin functions (in the Arelle repo) beginning with the “rule” prefix to verify that the decorator has been applied.

Parameters:
  • hook – The plugin validation hook the function should run with.

  • disclosureSystems – The disclosure systems the validation should run with.

  • excludeDisclosureSystems – The disclosure systems to exclude from running the rule with.

Returns:

the registered validation function.

arelle.utils.validate.Decorator._wrapStrWithList(items: list[str] | str | None) list[str] | None
class arelle.utils.validate.Decorator.ValidationAttributes
hook: arelle.utils.PluginHooks.ValidationHook

None

disclosureSystems: list[str] | None

None

excludeDisclosureSystems: list[str]

None

__post_init__() None
arelle.utils.validate.Decorator.getValidationAttributes(func: Callable[..., Any]) arelle.utils.validate.Decorator.ValidationAttributes | None
arelle.utils.validate.Decorator._setValidationAttributes(func: Callable[..., Any], attributes: arelle.utils.validate.Decorator.ValidationAttributes) None