chore: migrate use_container_width → width (Streamlit deprecation)
``use_container_width`` is being removed after 2025-12-31. Streamlit log was flooding the terminal with the deprecation notice on every rerun. Mechanical sweep: use_container_width=True → width="stretch" use_container_width=False → width="content" 51 call sites across 11 page files + ``app_demo.py``. Also renamed the ``local_download_button`` helper's ``use_container_width`` kwarg to ``width`` (default ``"stretch"``); it has no external callers passing the old name, so this is a safe rename. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ except Exception as e:
|
||||
_has_result = st.session_state.get("fmtstd_result") is not None
|
||||
with st.expander(f"Preview: {uploaded.name}", expanded=not _has_result):
|
||||
st.caption(f"{len(df)} rows, {len(df.columns)} columns")
|
||||
st.dataframe(df.head(10), use_container_width=True)
|
||||
st.dataframe(df.head(10), width="stretch")
|
||||
st.divider()
|
||||
|
||||
|
||||
@@ -478,7 +478,7 @@ with st.expander("Options", expanded=not _has_result):
|
||||
edited = st.data_editor(
|
||||
starter,
|
||||
num_rows="dynamic",
|
||||
use_container_width=True,
|
||||
width="stretch",
|
||||
column_config={
|
||||
"abbreviation": st.column_config.TextColumn(
|
||||
"Short form",
|
||||
@@ -530,7 +530,7 @@ run_disabled = not column_types
|
||||
if st.button(
|
||||
"Standardize Formats",
|
||||
type="primary",
|
||||
use_container_width=True,
|
||||
width="stretch",
|
||||
disabled=run_disabled,
|
||||
):
|
||||
with st.spinner("Standardizing..."):
|
||||
@@ -592,16 +592,16 @@ if result.cells_changed:
|
||||
st.markdown("**Changes by column**")
|
||||
st.dataframe(
|
||||
counts.rename("cells_changed").to_frame(),
|
||||
use_container_width=True,
|
||||
width="stretch",
|
||||
)
|
||||
|
||||
st.markdown("**Examples (first 25 changes)**")
|
||||
examples = result.changes.head(25).copy()
|
||||
examples["row"] = examples["row"] + 1
|
||||
st.dataframe(examples, use_container_width=True, hide_index=True)
|
||||
st.dataframe(examples, width="stretch", hide_index=True)
|
||||
|
||||
st.markdown("**Standardized preview (first 10 rows)**")
|
||||
st.dataframe(result.standardized_df.head(10), use_container_width=True)
|
||||
st.dataframe(result.standardized_df.head(10), width="stretch")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user