usse/scrape/venv/lib/python3.10/site-packages/cattrs/gen/_consts.py

20 lines
511 B
Python
Raw Normal View History

2023-12-22 14:26:01 +00:00
from __future__ import annotations
from threading import local
from typing import Any, Callable
from attrs import frozen
@frozen
class AttributeOverride:
omit_if_default: bool | None = None
rename: str | None = None
omit: bool | None = None # Omit the field completely.
struct_hook: Callable[[Any, Any], Any] | None = None # Structure hook to use.
unstruct_hook: Callable[[Any], Any] | None = None # Structure hook to use.
neutral = AttributeOverride()
already_generating = local()