BlogDocs

feat: Add simple validator metadata for use in annotated(#316)

Comparing
tlambert03:validators
(
5010f17
) with
main
(
18a6ec2
)
-1%
IMPROVEMENTS
0
REGRESSIONS
0
UNTOUCHED
66
NEW
0
DROPPED
0
IGNORED
0

Benchmarks

Passed

test_emit_time[lambda-2]
tests/test_bench.py::test_emit_time[lambda-2]
+2%
60.1 µs
58.9 µs
test_emit_time[real_func-34]
tests/test_bench.py::test_emit_time[real_func-34]
+2%
135.8 µs
133.8 µs
test_emit_time[partial-2]
tests/test_bench.py::test_emit_time[partial-2]
+1%
62.1 µs
61.4 µs
test_emit_time[partial-50]
tests/test_bench.py::test_emit_time[partial-50]
+1%
134 µs
132.8 µs
test_emit_time[partial_method-34]
tests/test_bench.py::test_emit_time[partial_method-34]
+1%
124.2 µs
123.3 µs
test_emit_time[lambda-34]
tests/test_bench.py::test_emit_time[lambda-34]
+1%
87.1 µs
86.5 µs
test_emit_time[function-34]
tests/test_bench.py::test_emit_time[function-34]
+1%
87.1 µs
86.7 µs
test_emit_time[function-50]
tests/test_bench.py::test_emit_time[function-50]
+1%
101 µs
100.4 µs
test_emit_time[partial_method-50]
tests/test_bench.py::test_emit_time[partial_method-50]
+1%
154.1 µs
153.3 µs
test_emit_time[lambda-18]
tests/test_bench.py::test_emit_time[lambda-18]
0%
72.8 µs
72.5 µs
test_connect_time[function-]
tests/test_bench.py::test_connect_time[function-]
0%
140.4 µs
139.8 µs
test_emit_time[partial-34]
tests/test_bench.py::test_emit_time[partial-34]
0%
109.3 µs
108.9 µs
test_emit_time[method-18]
tests/test_bench.py::test_emit_time[method-18]
0%
83.4 µs
83 µs
test_emit_time[function-18]
tests/test_bench.py::test_emit_time[function-18]
0%
72.8 µs
72.5 µs
test_emit_time[setattr-50]
tests/test_bench.py::test_emit_time[setattr-50]
0%
77.1 µs
76.8 µs
test_connect_time[method-check_types]
tests/test_bench.py::test_connect_time[method-check_types]
0%
183.4 µs
182.8 µs
test_emit_time[setitem-50]
tests/test_bench.py::test_emit_time[setitem-50]
0%
94.2 µs
93.9 µs
test_emit_time[method-50]
tests/test_bench.py::test_emit_time[method-50]
0%
125.2 µs
124.9 µs
test_emit_time[lambda-50]
tests/test_bench.py::test_emit_time[lambda-50]
0%
101.1 µs
100.9 µs
test_create_signal_instance
tests/test_bench.py::test_create_signal_instance
0%
33.4 µs
33.3 µs
test_connect_time[partial-check_types]
tests/test_bench.py::test_connect_time[partial-check_types]
0%
255.6 µs
254.9 µs
test_connect_time[lambda-]
tests/test_bench.py::test_connect_time[lambda-]
0%
138.9 µs
138.5 µs
test_connect_time[real_func-check_types]
tests/test_bench.py::test_connect_time[real_func-check_types]
0%
126.8 µs
126.5 µs
test_emit_time[partial-18]
tests/test_bench.py::test_emit_time[partial-18]
0%
86.1 µs
85.9 µs
test_dataclass_setattr[msgspec]
tests/test_bench.py::test_dataclass_setattr[msgspec]
0%
772.4 µs
771 µs
test_emit_time[print-50]
tests/test_bench.py::test_emit_time[print-50]
0%
371.4 µs
370.8 µs
test_emit_time[real_func-18]
tests/test_bench.py::test_emit_time[real_func-18]
0%
100.4 µs
100.2 µs
test_emit_time[print-2]
tests/test_bench.py::test_emit_time[print-2]
0%
85.4 µs
85.3 µs
test_connect_time[lambda-check_types]
tests/test_bench.py::test_connect_time[lambda-check_types]
0%
142.9 µs
142.8 µs
test_connect_time[function-check_types]
tests/test_bench.py::test_connect_time[function-check_types]
0%
155.6 µs
155.5 µs
test_emit_time[real_func-50]
tests/test_bench.py::test_emit_time[real_func-50]
0%
168.5 µs
168.4 µs
test_dataclass_setattr[pydantic]
tests/test_bench.py::test_dataclass_setattr[pydantic]
0%
863.3 µs
862.9 µs
test_emit_time[partial_method-2]
tests/test_bench.py::test_emit_time[partial_method-2]
0%
65.1 µs
65.1 µs
test_emit_time[setitem-34]
tests/test_bench.py::test_emit_time[setitem-34]
0%
81.9 µs
81.9 µs
test_emit_time[print-34]
tests/test_bench.py::test_emit_time[print-34]
0%
273.6 µs
273.7 µs
test_emit_time[method-2]
tests/test_bench.py::test_emit_time[method-2]
0%
69 µs
69 µs
test_connect_time[real_func-]
tests/test_bench.py::test_connect_time[real_func-]
0%
123.5 µs
123.6 µs
test_emit_time[print-18]
tests/test_bench.py::test_emit_time[print-18]
0%
176.1 µs
176.3 µs
test_emit_time[method-34]
tests/test_bench.py::test_emit_time[method-34]
0%
104 µs
104.2 µs
test_emit_time[setitem-18]
tests/test_bench.py::test_emit_time[setitem-18]
0%
69.8 µs
69.9 µs
test_emit_time[setattr-18]
tests/test_bench.py::test_emit_time[setattr-18]
0%
62.9 µs
63 µs
test_connect_time[partial-]
tests/test_bench.py::test_connect_time[partial-]
0%
245.1 µs
245.5 µs
test_connect_time[method-]
tests/test_bench.py::test_connect_time[method-]
0%
175.2 µs
175.6 µs
test_dataclass_setattr[dataclass]
tests/test_bench.py::test_dataclass_setattr[dataclass]
0%
752.2 µs
754 µs
test_connect_time[partial_method-check_types]
tests/test_bench.py::test_connect_time[partial_method-check_types]
0%
282.9 µs
283.6 µs
test_emit_time[setattr-34]
tests/test_bench.py::test_emit_time[setattr-34]
0%
69.9 µs
70.1 µs
test_emit_time[setitem-2]
tests/test_bench.py::test_emit_time[setitem-2]
0%
58.3 µs
58.5 µs
test_emit_time[real_func-2]
tests/test_bench.py::test_emit_time[real_func-2]
0%
66.2 µs
66.5 µs
test_emit_time[partial_method-18]
tests/test_bench.py::test_emit_time[partial_method-18]
-1%
94.3 µs
94.9 µs
test_connect_time[partial_method-]
tests/test_bench.py::test_connect_time[partial_method-]
-1%
275.5 µs
277.4 µs
test_emit_time[setattr-2]
tests/test_bench.py::test_emit_time[setattr-2]
-1%
56 µs
56.4 µs
test_emit_time[function-2]
tests/test_bench.py::test_emit_time[function-2]
-1%
63.5 µs
64.2 µs
test_connect_time[print-check_types]
tests/test_bench.py::test_connect_time[print-check_types]
-1%
205.7 µs
208.1 µs
test_dataclass_setattr[attrs]
tests/test_bench.py::test_dataclass_setattr[attrs]
-1%
767.6 µs
776.4 µs
test_connect_time[print-]
tests/test_bench.py::test_connect_time[print-]
-1%
146.1 µs
148.2 µs
test_evented_creation
tests/test_bench.py::test_evented_creation
-2%
1.7 ms
1.7 ms
test_connect_time[setitem-check_types]
tests/test_bench.py::test_connect_time[setitem-check_types]
-2%
65 µs
66.2 µs
test_create_signal
tests/test_bench.py::test_create_signal
-2%
75 µs
76.4 µs
test_connect_time[setitem-]
tests/test_bench.py::test_connect_time[setitem-]
-3%
61.9 µs
63.9 µs
test_dataclass_group_create[pydantic]
tests/test_bench.py::test_dataclass_group_create[pydantic]
-3%
541 µs
560 µs
test_dataclass_group_create[attrs]
tests/test_bench.py::test_dataclass_group_create[attrs]
-4%
535.5 µs
555 µs
test_dataclass_group_create[msgspec]
tests/test_bench.py::test_dataclass_group_create[msgspec]
-4%
539.2 µs
559.3 µs
test_dataclass_group_create[dataclass]
tests/test_bench.py::test_dataclass_group_create[dataclass]
-4%
520.4 µs
540.6 µs
test_connect_time[setattr-check_types]
tests/test_bench.py::test_connect_time[setattr-check_types]
-6%
65 µs
68.8 µs
test_connect_time[setattr-]
tests/test_bench.py::test_connect_time[setattr-]
-6%
59.1 µs
63.2 µs
test_evented_setattr
tests/test_bench.py::test_evented_setattr
-7%
27.2 µs
29.2 µs

Commits

Click on a commit to change the comparison range
base
main
18a6ec2
0%
feat: validators
7062dc0
5 months ago
by tlambert03
0%
resolve
d25f898
5 months ago
by tlambert03
-14%
add default
1cc4fce
5 months ago
by tlambert03
+14%
Update _group_descriptor.py Co-authored-by: Davis Bennett <davis.v.bennett@gmail.com>
44af4b2
5 months ago
by tlambert03
-1%
Merge branch 'main' into validators
5010f17
2 months ago
by tlambert03
ResourcesHomePricingDocsBlogGitHubChangelog
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.