-
ClearingErrorStore — Take over error processing.
-
ClearingErrorStoreSchema — Suppress Marshmallow errors to skip errored fields.
comicbox.schemas.error_store¶
source module comicbox.schemas.error_store
For marshmallow schemas that never fail on load, but instead just remove keys.
Classes
source class ClearingErrorStore(error_store: ErrorStore, data: Mapping[str, Any], path: str | None = None, ignore_errors: frozenset | None = None)
Bases : ErrorStore
Take over error processing.
Take over error processing.
Methods
-
store_error — Store error, but process and clear it.
source method ClearingErrorStore.store_error(*args: Any, **kwargs: Any) → None
Store error, but process and clear it.
source class ClearingErrorStoreSchema(path: Path | str | None = None, ignore_errors: list | tuple | frozenset | set | None = None, **kwargs: Any)
Bases : Schema
Suppress Marshmallow errors to skip errored fields.
Initialize path and always use partial.
Methods
-
set_path — Set the path for error messages.
-
handle_error — Log unignored errors at WARNING; ignored errors are dropped.
source method ClearingErrorStoreSchema.set_path(path: Path | str | None) → None
Set the path for error messages.
source method ClearingErrorStoreSchema.handle_error(error: Any, *_args: Any, **_kwargs: Any) → None
Log unignored errors at WARNING; ignored errors are dropped.