forked from open-feature/python-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhook_data.py
More file actions
34 lines (27 loc) · 739 Bytes
/
Copy pathhook_data.py
File metadata and controls
34 lines (27 loc) · 739 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
"""Requirement 4.6.1"""
from openfeature.hook import HookData
# positive
any_hook_data: HookData = {
"user": {
"id": 12345,
"name": "John Doe",
"active": True,
"permissions": ["read", "write", "admin"],
"metadata": {
"source": "api",
"version": 2.1,
"tags": ["premium", "beta"],
"config": {
"nested_deeply": [
{"item": 1, "enabled": True},
{"item": 2, "enabled": False},
]
},
},
},
}
class ExampleClass:
pass
class_hook_data: HookData = {"example": ExampleClass}
# negative
int_key_hook_data: HookData = {42: 42} # type: ignore[dict-item]