Commit 64f11a6
chore: Avoid mutable default arguments in
Changed default values for `session_service`, `artifact_service`, and `run_config` from instances of mutable classes to `None`. Instances are now created within the function body if the argument is not provided, preventing unexpected shared state across function calls.
PiperOrigin-RevId: 804624564local_eval_service and runners
1 parent d56dd08 commit 64f11a6
File tree
3 files changed
+9
-21
lines changed- src/google/adk
- evaluation
- tests/unittests/cli
3 files changed
+9
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | 79 | | |
85 | 80 | | |
86 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | 208 | | |
210 | 209 | | |
211 | 210 | | |
| |||
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
252 | | - | |
| 251 | + | |
253 | 252 | | |
254 | 253 | | |
255 | 254 | | |
| |||
262 | 261 | | |
263 | 262 | | |
264 | 263 | | |
265 | | - | |
266 | 264 | | |
267 | 265 | | |
268 | 266 | | |
| |||
428 | 426 | | |
429 | 427 | | |
430 | 428 | | |
431 | | - | |
| 429 | + | |
432 | 430 | | |
433 | 431 | | |
434 | 432 | | |
| |||
454 | 452 | | |
455 | 453 | | |
456 | 454 | | |
457 | | - | |
458 | 455 | | |
459 | 456 | | |
460 | 457 | | |
| |||
604 | 601 | | |
605 | 602 | | |
606 | 603 | | |
607 | | - | |
| 604 | + | |
608 | 605 | | |
609 | 606 | | |
610 | 607 | | |
| |||
617 | 614 | | |
618 | 615 | | |
619 | 616 | | |
620 | | - | |
621 | 617 | | |
622 | 618 | | |
623 | 619 | | |
| |||
649 | 645 | | |
650 | 646 | | |
651 | 647 | | |
652 | | - | |
| 648 | + | |
653 | 649 | | |
654 | 650 | | |
655 | | - | |
656 | 651 | | |
657 | 652 | | |
658 | 653 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
| |||
121 | 120 | | |
122 | 121 | | |
123 | 122 | | |
124 | | - | |
| 123 | + | |
125 | 124 | | |
126 | | - | |
127 | 125 | | |
128 | 126 | | |
129 | 127 | | |
| |||
0 commit comments