Coerces a loosely-formatted legacy accessor_mode string (unbracketed, mis-cased, or padded) to its canonical bracketed Literal form. Unrecognized strings fall back to None (logged) rather than raising, so a malformed legacy payload degrades gracefully instead of crashing the whole parse.
Returns:
One of “[get]”, “[set]”, “[get, set]”; value unchanged if it isn’t a
Methods
_normalize_accessor_mode
_normalize_accessor_mode(value) -> Optional[str]
Coerces a loosely-formatted legacy accessor_mode string (unbracketed, mis-cased, or padded) to its canonical bracketed Literal form. Unrecognized strings fall back to None (logged) rather than raising, so a malformed legacy payload degrades gracefully instead of crashing the whole parse.
Returns:
One of “[get]”, “[set]”, “[get, set]”; value unchanged if it isn’t a
| Parameter | Type | Description |
|---|---|---|
| value | Any | The raw accessor_mode value (typically a str, but any type is |
Generated with Flude
Copyright © 2026