Repository navigation
Commit d8cb464
fix: remove dead serialize_dict call in format_prop (#7587)
* fix: remove dead serialize_dict call in format_prop
format_prop's dict branch called serializers.serialize_dict, which no
longer exists, so a plain dict raised AttributeError instead of being
formatted. Every framework caller passes a Var or EventChain and returns
before reaching it, so the branch was dead internally. Let dicts fall
through to json_dumps like every other literal, which encodes nested
values through the registered serializers.
Closes ENG-10109.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VmkRjNPQfbihbxXpYNqXh6
* refactor: drop unreachable checks in format_prop
json_dumps always returns a str, so the ValueError guard and the
InvalidStylePropError re-raise can never fire. Narrow the return type
to str and cover a serializer-encoded nested value in the raw dict test.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Farhan <www.mfarvirus@gmail.com>
Co-authored-by: Farhan Ali Raza <62690310+FarhanAliRaza@users.noreply.github.com>1 parent f51f3d3 commit d8cb464
3 files changed
Lines changed: 23 additions & 17 deletions
File tree
- packages/reflex-base
- news
- src/reflex_base/utils
- tests/units/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
369 | 368 | | |
370 | 369 | | |
371 | 370 | | |
372 | | - | |
| 371 | + | |
373 | 372 | | |
374 | 373 | | |
375 | 374 | | |
| |||
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
382 | | - | |
383 | 381 | | |
384 | | - | |
385 | 382 | | |
386 | 383 | | |
387 | 384 | | |
388 | | - | |
389 | 385 | | |
390 | 386 | | |
391 | 387 | | |
| |||
403 | 399 | | |
404 | 400 | | |
405 | 401 | | |
406 | | - | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 402 | + | |
| 403 | + | |
415 | 404 | | |
416 | 405 | | |
417 | 406 | | |
418 | 407 | | |
419 | 408 | | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | 409 | | |
424 | 410 | | |
425 | 411 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
578 | 578 | | |
579 | 579 | | |
580 | 580 | | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
581 | 600 | | |
582 | 601 | | |
583 | 602 | | |
| |||
0 commit comments