Skip to content

Allow update_title=None in Dash constructor typing - #4104

Open
T4rk1n wants to merge 2 commits into
devfrom
fix-update-title-typing
Open

T4rk1n wants to merge 2 commits into
devfrom
fix-update-title-typing

Conversation

@T4rk1n

@T4rk1n T4rk1n commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

update_title is documented as accepting None or '' to leave document.title alone during callbacks, and the renderer already handles it (test_rdls003_update_title covers both), but the hint was str, so pyright and mypy rejected Dash(update_title=None).

  • Type update_title as Optional[str] in Dash.__init__.
  • Match the renderer config type (string | null).
  • Add test_typi003_dash_constructor_typing: the None case fails under pyright before the change and passes after.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Dash performance benchmarks

✅ all within thresholds

scenario metric p90 (ms) median growth baseline p90 note
✅ callback_chain chain_ms 417.5 410.9 0.94x 499.1
✅ callback_chain graph_ms 3.2 3.2 1.0x 2.4
✅ callback_fanout fanout_ms 84.6 78.1 0.88x 92.5
✅ deep_nesting render_ms 55.3 51.6 1.01x 56.8
✅ full_children_replace replace_ms 5424.7 1905.9 18.64x 4697.1
✅ initial_render_large render_ms 588.4 565.5 1.02x 694.4
✅ initial_render_small render_ms 101.2 92.6 0.98x 104.0
✅ patch_append_nested append_ms 116.0 87.7 2.29x 192.3
✅ patch_append_toplevel append_ms 110.2 82.8 1.98x 140.2
✅ patch_scalar_update_large update_ms 153.6 145.5 0.94x 202.9
✅ wildcard_all_resolve wildcard_ms 302.8 293.0 0.95x 313.6
✅ wildcard_all_resolve graph_ms 1.3 1.3 1.0x 1.3

growth = late-third / early-third per-op time; ~1 is flat, a large value means the per-op cost scales with accumulated state.

machine scale vs baseline: 0.96x - divided out of the baseline ratios so they compare like for like (the absolute warn/fail ceilings are left un-scaled); calibrated on initial_render_small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant