Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/cattrs/gen/_consts.py: 93%

Shortcuts on this page

r m x   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

14 statements  

1from __future__ import annotations 

2 

3from threading import local 

4from typing import Any, Callable 

5 

6from attrs import frozen 

7 

8 

9@frozen 

10class AttributeOverride: 

11 omit_if_default: bool | None = None 

12 rename: str | None = None 

13 omit: bool | None = None # Omit the field completely. 

14 struct_hook: Callable[[Any, Any], Any] | None = None # Structure hook to use. 

15 unstruct_hook: Callable[[Any], Any] | None = None # Structure hook to use. 

16 

17 

18neutral = AttributeOverride() 

19already_generating = local()