streamlit-nightly 1.45.2.dev20250523__py3-none-any.whl → 1.45.2.dev20250526__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- streamlit/commands/echo.py +1 -1
- streamlit/config.py +2 -1
- streamlit/config_option.py +1 -1
- streamlit/config_util.py +4 -5
- streamlit/elements/exception.py +4 -12
- streamlit/elements/graphviz_chart.py +1 -1
- streamlit/elements/heading.py +3 -4
- streamlit/elements/lib/image_utils.py +2 -3
- streamlit/elements/markdown.py +1 -1
- streamlit/elements/media.py +1 -1
- streamlit/elements/progress.py +3 -3
- streamlit/elements/widgets/button.py +1 -1
- streamlit/elements/widgets/color_picker.py +8 -14
- streamlit/elements/widgets/radio.py +1 -1
- streamlit/elements/widgets/selectbox.py +1 -1
- streamlit/elements/widgets/slider.py +10 -18
- streamlit/elements/widgets/text_widgets.py +1 -2
- streamlit/hello/animation_demo.py +1 -1
- streamlit/hello/mapping_demo.py +3 -4
- streamlit/logger.py +1 -1
- streamlit/runtime/caching/hashing.py +8 -9
- streamlit/runtime/credentials.py +8 -21
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.qteVcUUN.js → ErrorOutline.esm.CtshIbC5.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.ncu7N-Hr.js → FileDownload.esm.A0XrMp_A.js} +1 -1
- streamlit/static/static/js/{FileHelper.zsMZ7RXt.js → FileHelper.BkYmOfR4.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.W8yVYXZp.js → FormClearHelper.DvUrjO5s.js} +1 -1
- streamlit/static/static/js/{Hooks.DBj6srQ1.js → Hooks.Dw0PPeMp.js} +1 -1
- streamlit/static/static/js/{InputInstructions.BobLsJJb.js → InputInstructions.BwkpOG-3.js} +1 -1
- streamlit/static/static/js/{ProgressBar.CtvJrIzN.js → ProgressBar.Po8toa5U.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.DnT_UdzV.js → RenderInPortalIfExists.DG7izwhP.js} +1 -1
- streamlit/static/static/js/{Toolbar.BVF7NtOB.js → Toolbar.zoRxypF9.js} +1 -1
- streamlit/static/static/js/{base-input.B4sdS3vw.js → base-input.3hmq5vR4.js} +1 -1
- streamlit/static/static/js/{checkbox.DKDitzF8.js → checkbox.DHVebTBP.js} +1 -1
- streamlit/static/static/js/{createSuper.mhx956J9.js → createSuper.CCzF882j.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.CmXS0PAX.js → data-grid-overlay-editor.CRIS0V5u.js} +1 -1
- streamlit/static/static/js/{downloader.Cnd9SuxG.js → downloader.DOuJ7F43.js} +1 -1
- streamlit/static/static/js/{es6.DM-pf09u.js → es6.BojNhy97.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.Gc5GAjZM.js → iframeResizer.contentWindow.CmN7IDO7.js} +1 -1
- streamlit/static/static/js/{index.WWYmGCrM.js → index.3HscCA0Q.js} +1 -1
- streamlit/static/static/js/{index.BV38yp5k.js → index.B0GUCtHl.js} +1 -1
- streamlit/static/static/js/{index.DdyZtGcg.js → index.B3Y99Usz.js} +1 -1
- streamlit/static/static/js/{index.DIyx-z1Q.js → index.B6guKn0h.js} +1 -1
- streamlit/static/static/js/{index.CjBaoWYr.js → index.BEfxU01i.js} +1 -1
- streamlit/static/static/js/{index.BfusYuD8.js → index.BMWx_YQD.js} +1 -1
- streamlit/static/static/js/{index.BWTBe3a1.js → index.BV-8GugV.js} +1 -1
- streamlit/static/static/js/{index.gBOr8z2K.js → index.BXfm7UZe.js} +1 -1
- streamlit/static/static/js/{index.CWgnk1N4.js → index.BfcdLS9y.js} +1 -1
- streamlit/static/static/js/{index.COBionvf.js → index.BgmEuudT.js} +1 -1
- streamlit/static/static/js/{index.DQGSbu2C.js → index.BsiojTxz.js} +1 -1
- streamlit/static/static/js/{index.I3iNnzJx.js → index.BvWDoWjf.js} +1 -1
- streamlit/static/static/js/{index.p2Wl4zMi.js → index.CLFnBokZ.js} +1 -1
- streamlit/static/static/js/{index.DOl-SOKu.js → index.CPiByGGr.js} +1 -1
- streamlit/static/static/js/{index.C_2m4F7k.js → index.CTVSiPCo.js} +1 -1
- streamlit/static/static/js/{index.DTU7qmDP.js → index.CVxkW_lc.js} +1 -1
- streamlit/static/static/js/{index.BkLkRTpZ.js → index.CWweAMBx.js} +1 -1
- streamlit/static/static/js/{index.BR-S54Iv.js → index.CZ6f-p0K.js} +1 -1
- streamlit/static/static/js/{index.B45ExNhw.js → index.CdgLDqMc.js} +1 -1
- streamlit/static/static/js/{index.DAvhwYMG.js → index.Cpz3pp0B.js} +1 -1
- streamlit/static/static/js/{index.CJ-XXd1r.js → index.CzMgwzgb.js} +1 -1
- streamlit/static/static/js/{index.DOYomqqU.js → index.DH2YAEv6.js} +1 -1
- streamlit/static/static/js/{index.B0E6Rv1F.js → index.DNlMgaSP.js} +1 -1
- streamlit/static/static/js/{index.CgOynO1t.js → index.DP7RHJHC.js} +1 -1
- streamlit/static/static/js/{index.B29JQLHa.js → index.DcLQo3NB.js} +5 -5
- streamlit/static/static/js/{index.BJQNG4O1.js → index.DkNaEiLi.js} +1 -1
- streamlit/static/static/js/{index.BONHiJUZ.js → index.DtpZrdsz.js} +1 -1
- streamlit/static/static/js/{index.AWkO-7e-.js → index.HdiDLe37.js} +1 -1
- streamlit/static/static/js/{index.B6xTo8b8.js → index.Ih0EXMso.js} +1 -1
- streamlit/static/static/js/{index.vOqxh1m2.js → index.R5J-UXhx.js} +1 -1
- streamlit/static/static/js/{index.D4XRYl23.js → index.VVmp3qV7.js} +1 -1
- streamlit/static/static/js/{index.DwUISpCs.js → index.YePOPnW6.js} +5 -5
- streamlit/static/static/js/{index.BNNR5Jmd.js → index.YtwVjbe-.js} +1 -1
- streamlit/static/static/js/{index._BaeK1t7.js → index.kWUcv9pK.js} +1 -1
- streamlit/static/static/js/{index.CkKptP1T.js → index.muQ-sA7D.js} +1 -1
- streamlit/static/static/js/{index.C5KKmyWy.js → index.p5qVS5RU.js} +1 -1
- streamlit/static/static/js/{index.CZ5fZcT5.js → index.whcmqOYZ.js} +1 -1
- streamlit/static/static/js/{input.BvD9DHLa.js → input.C95vVzrH.js} +1 -1
- streamlit/static/static/js/{memory.DCVB1HOm.js → memory.lfILky3m.js} +1 -1
- streamlit/static/static/js/{mergeWith.BqTORFAq.js → mergeWith.CdpKbzWl.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.VB_OvuPv.js → number-overlay-editor.D2TjUrKf.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.DhYxBDlj.js → possibleConstructorReturn.DQV58bYB.js} +1 -1
- streamlit/static/static/js/{sandbox.CoN7LRFk.js → sandbox.R1dhBCnm.js} +1 -1
- streamlit/static/static/js/{textarea.DkHpIjdT.js → textarea.t5D4QCw3.js} +1 -1
- streamlit/static/static/js/{timepicker.C8UIzYhf.js → timepicker.BI9iPIxz.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.DXfr1fvT.js → toConsumableArray.COyXrPhy.js} +1 -1
- streamlit/static/static/js/{uniqueId.CgrMSBTb.js → uniqueId.CaWObuU_.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.C-e-WEFS.js → useBasicWidgetState.Wd2TSACf.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.CtRJhZD6.js → useOnInputChange.CUFXty-S.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.od0SAvAK.js → withFullScreenWrapper.wgkD5MeK.js} +1 -1
- streamlit/watcher/path_watcher.py +2 -3
- streamlit/web/bootstrap.py +1 -1
- streamlit/web/server/server.py +1 -1
- {streamlit_nightly-1.45.2.dev20250523.dist-info → streamlit_nightly-1.45.2.dev20250526.dist-info}/METADATA +2 -2
- {streamlit_nightly-1.45.2.dev20250523.dist-info → streamlit_nightly-1.45.2.dev20250526.dist-info}/RECORD +98 -98
- {streamlit_nightly-1.45.2.dev20250523.dist-info → streamlit_nightly-1.45.2.dev20250526.dist-info}/WHEEL +1 -1
- {streamlit_nightly-1.45.2.dev20250523.data → streamlit_nightly-1.45.2.dev20250526.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.2.dev20250523.dist-info → streamlit_nightly-1.45.2.dev20250526.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.2.dev20250523.dist-info → streamlit_nightly-1.45.2.dev20250526.dist-info}/top_level.txt +0 -0
streamlit/commands/echo.py
CHANGED
@@ -101,7 +101,7 @@ def echo(
|
|
101
101
|
show_code(code_string, "python")
|
102
102
|
|
103
103
|
except FileNotFoundError as err:
|
104
|
-
show_warning("Unable to display code.
|
104
|
+
show_warning(f"Unable to display code. {err}")
|
105
105
|
|
106
106
|
|
107
107
|
def _get_initial_indent(lines: Iterable[str]) -> int:
|
streamlit/config.py
CHANGED
@@ -1301,7 +1301,8 @@ def get_where_defined(key: str) -> str:
|
|
1301
1301
|
config_options = get_config_options()
|
1302
1302
|
|
1303
1303
|
if key not in config_options:
|
1304
|
-
|
1304
|
+
msg = f'Config key "{key}" not defined.'
|
1305
|
+
raise RuntimeError(msg)
|
1305
1306
|
return config_options[key].where_defined
|
1306
1307
|
|
1307
1308
|
|
streamlit/config_option.py
CHANGED
@@ -189,7 +189,7 @@ class ConfigOption:
|
|
189
189
|
if self.replaced_by:
|
190
190
|
self.deprecated = True
|
191
191
|
if deprecation_text is None:
|
192
|
-
deprecation_text = "Replaced by
|
192
|
+
deprecation_text = f"Replaced by {self.replaced_by}."
|
193
193
|
|
194
194
|
if self.deprecated:
|
195
195
|
if not expiration_date:
|
streamlit/config_util.py
CHANGED
@@ -84,7 +84,7 @@ def show_config(
|
|
84
84
|
continue
|
85
85
|
|
86
86
|
out.append("")
|
87
|
-
append_section("[
|
87
|
+
append_section(f"[{section}]")
|
88
88
|
out.append("")
|
89
89
|
|
90
90
|
for option in section_options.values():
|
@@ -125,8 +125,7 @@ def show_config(
|
|
125
125
|
append_comment(line)
|
126
126
|
append_comment("")
|
127
127
|
append_comment(
|
128
|
-
"This option will be removed on or after
|
129
|
-
% option.expiration_date
|
128
|
+
f"This option will be removed on or after {option.expiration_date}."
|
130
129
|
)
|
131
130
|
|
132
131
|
import toml
|
@@ -138,7 +137,7 @@ def show_config(
|
|
138
137
|
# Ensure a line break before appending "Default" comment, if not already there
|
139
138
|
if out[-1] != "#":
|
140
139
|
append_comment("")
|
141
|
-
append_comment("Default:
|
140
|
+
append_comment(f"Default: {toml_default}")
|
142
141
|
else:
|
143
142
|
# Don't say "Default: (unset)" here because this branch applies
|
144
143
|
# to complex config settings too.
|
@@ -151,7 +150,7 @@ def show_config(
|
|
151
150
|
if option_is_manually_set:
|
152
151
|
if out[-1] != "# ":
|
153
152
|
append_comment("")
|
154
|
-
append_comment("The value below was set in
|
153
|
+
append_comment(f"The value below was set in {option.where_defined}")
|
155
154
|
|
156
155
|
toml_setting = toml.dumps({key: option.value})
|
157
156
|
|
streamlit/elements/exception.py
CHANGED
@@ -237,18 +237,10 @@ def _format_syntax_error_message(exception: SyntaxError) -> str:
|
|
237
237
|
)
|
238
238
|
|
239
239
|
return (
|
240
|
-
'File "
|
241
|
-
"
|
242
|
-
"
|
243
|
-
"
|
244
|
-
% {
|
245
|
-
"filename": exception.filename,
|
246
|
-
"lineno": exception.lineno,
|
247
|
-
"text": exception.text.rstrip(),
|
248
|
-
"caret_indent": caret_indent,
|
249
|
-
"errname": type(exception).__name__,
|
250
|
-
"msg": exception.msg,
|
251
|
-
}
|
240
|
+
f'File "{exception.filename}", line {exception.lineno}\n'
|
241
|
+
f" {exception.text.rstrip()}\n"
|
242
|
+
f" {caret_indent}^\n"
|
243
|
+
f"{type(exception).__name__}: {exception.msg}"
|
252
244
|
)
|
253
245
|
# If a few edge cases, SyntaxErrors don't have all these nice fields. So we
|
254
246
|
# have a fall back here.
|
streamlit/elements/heading.py
CHANGED
@@ -286,14 +286,13 @@ class HeadingMixin:
|
|
286
286
|
proto.anchor = anchor
|
287
287
|
elif anchor is True: # type: ignore
|
288
288
|
raise StreamlitAPIException(
|
289
|
-
"Anchor parameter has invalid value:
|
290
|
-
"Supported values: None, any string or False"
|
289
|
+
f"Anchor parameter has invalid value: {anchor}. "
|
290
|
+
"Supported values: None, any string or False"
|
291
291
|
)
|
292
292
|
else:
|
293
293
|
raise StreamlitAPIException(
|
294
|
-
"Anchor parameter has invalid type:
|
294
|
+
f"Anchor parameter has invalid type: {type(anchor).__name__}. "
|
295
295
|
"Supported values: None, any string or False"
|
296
|
-
% type(anchor).__name__
|
297
296
|
)
|
298
297
|
|
299
298
|
if help:
|
@@ -160,8 +160,7 @@ def _verify_np_shape(array: npt.NDArray[Any]) -> npt.NDArray[Any]:
|
|
160
160
|
raise StreamlitAPIException("Numpy shape has to be of length 2 or 3.")
|
161
161
|
if len(shape) == 3 and shape[-1] not in (1, 3, 4):
|
162
162
|
raise StreamlitAPIException(
|
163
|
-
"Channel can only be 1, 3, or 4 got
|
164
|
-
% (shape[-1], str(shape))
|
163
|
+
f"Channel can only be 1, 3, or 4 got {shape[-1]}. Shape is {shape}"
|
165
164
|
)
|
166
165
|
|
167
166
|
# If there's only one channel, convert is to x, y
|
@@ -437,7 +436,7 @@ def marshall_images(
|
|
437
436
|
|
438
437
|
# We use the index of the image in the input image list to identify this image inside
|
439
438
|
# MediaFileManager. For this, we just add the index to the image's "coordinates".
|
440
|
-
image_id = "
|
439
|
+
image_id = f"{coordinates}-{coord_suffix}"
|
441
440
|
|
442
441
|
proto_img.url = image_to_url(
|
443
442
|
single_image, width, clamp, channels, output_format, image_id
|
streamlit/elements/markdown.py
CHANGED
@@ -252,7 +252,7 @@ class MarkdownMixin:
|
|
252
252
|
body = sympy.latex(body)
|
253
253
|
|
254
254
|
latex_proto = MarkdownProto()
|
255
|
-
latex_proto.body = "$$\n
|
255
|
+
latex_proto.body = f"$$\n{clean_text(body)}\n$$"
|
256
256
|
latex_proto.element_type = MarkdownProto.Type.LATEX
|
257
257
|
if help:
|
258
258
|
latex_proto.help = help
|
streamlit/elements/media.py
CHANGED
@@ -478,7 +478,7 @@ def _marshall_av_media(
|
|
478
478
|
elif type_util.is_type(data, "numpy.ndarray"):
|
479
479
|
data_or_filename = cast("npt.NDArray[Any]", data).tobytes()
|
480
480
|
else:
|
481
|
-
raise RuntimeError("Invalid binary data format:
|
481
|
+
raise RuntimeError(f"Invalid binary data format: {type(data)}")
|
482
482
|
|
483
483
|
if runtime.exists():
|
484
484
|
file_url = runtime.get_instance().media_file_mgr.add(
|
streamlit/elements/progress.py
CHANGED
@@ -66,17 +66,17 @@ def _get_value(value: FloatOrInt) -> int:
|
|
66
66
|
if 0 <= value <= 100:
|
67
67
|
return value
|
68
68
|
raise StreamlitAPIException(
|
69
|
-
"Progress Value has invalid value [0, 100]:
|
69
|
+
f"Progress Value has invalid value [0, 100]: {value}"
|
70
70
|
)
|
71
71
|
|
72
72
|
if isinstance(value, float):
|
73
73
|
if _check_float_between(value, low=0.0, high=1.0):
|
74
74
|
return int(value * 100)
|
75
75
|
raise StreamlitAPIException(
|
76
|
-
"Progress Value has invalid value [0.0, 1.0]:
|
76
|
+
f"Progress Value has invalid value [0.0, 1.0]: {value}"
|
77
77
|
)
|
78
78
|
raise StreamlitAPIException(
|
79
|
-
"Progress Value has invalid type:
|
79
|
+
f"Progress Value has invalid type: {type(value).__name__}"
|
80
80
|
)
|
81
81
|
|
82
82
|
|
@@ -1105,7 +1105,7 @@ def marshall_file(
|
|
1105
1105
|
data_as_bytes = data.read() or b""
|
1106
1106
|
mimetype = mimetype or "application/octet-stream"
|
1107
1107
|
else:
|
1108
|
-
raise StreamlitAPIException("Invalid binary data format:
|
1108
|
+
raise StreamlitAPIException(f"Invalid binary data format: {type(data)}")
|
1109
1109
|
|
1110
1110
|
if runtime.exists():
|
1111
1111
|
file_url = runtime.get_instance().media_file_mgr.add(
|
@@ -206,25 +206,19 @@ class ColorPickerMixin:
|
|
206
206
|
|
207
207
|
# make sure the value is a string
|
208
208
|
if not isinstance(value, str):
|
209
|
-
raise StreamlitAPIException(
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
"""
|
214
|
-
% type(value).__name__
|
215
|
-
)
|
209
|
+
raise StreamlitAPIException(f"""
|
210
|
+
Color Picker Value has invalid type: {type(value).__name__}. Expects a hex string
|
211
|
+
like '#00FFAA' or '#000'.
|
212
|
+
""")
|
216
213
|
|
217
214
|
# validate the value and expects a hex string
|
218
215
|
match = re.match(r"^#(?:[0-9a-fA-F]{3}){1,2}$", value)
|
219
216
|
|
220
217
|
if not match:
|
221
|
-
raise StreamlitAPIException(
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
"""
|
226
|
-
% value
|
227
|
-
)
|
218
|
+
raise StreamlitAPIException(f"""
|
219
|
+
'{value}' is not a valid hex code for colors. Valid ones are like
|
220
|
+
'#00FFAA' or '#000'.
|
221
|
+
""")
|
228
222
|
|
229
223
|
color_picker_proto = ColorPickerProto()
|
230
224
|
color_picker_proto.id = element_id
|
@@ -351,7 +351,7 @@ class RadioMixin:
|
|
351
351
|
|
352
352
|
if not isinstance(index, int) and index is not None:
|
353
353
|
raise StreamlitAPIException(
|
354
|
-
"Radio Value has invalid type:
|
354
|
+
f"Radio Value has invalid type: {type(index).__name__}"
|
355
355
|
)
|
356
356
|
|
357
357
|
if index is not None and len(opt) > 0 and not 0 <= index < len(opt):
|
@@ -495,7 +495,7 @@ class SelectboxMixin:
|
|
495
495
|
|
496
496
|
if not isinstance(index, int) and index is not None:
|
497
497
|
raise StreamlitAPIException(
|
498
|
-
"Selectbox Value has invalid type:
|
498
|
+
f"Selectbox Value has invalid type: {type(index).__name__}"
|
499
499
|
)
|
500
500
|
|
501
501
|
if index is not None and len(opt) > 0 and not 0 <= index < len(opt):
|
@@ -813,17 +813,13 @@ class SliderMixin:
|
|
813
813
|
)
|
814
814
|
|
815
815
|
if not int_args and not float_args and not timelike_args:
|
816
|
-
|
816
|
+
msg = (
|
817
817
|
"Slider value arguments must be of matching types."
|
818
|
-
"\n`min_value` has
|
819
|
-
"\n`max_value` has
|
820
|
-
"\n`step` has
|
821
|
-
% {
|
822
|
-
"min_type": type(min_value).__name__,
|
823
|
-
"max_type": type(max_value).__name__,
|
824
|
-
"step": type(step).__name__,
|
825
|
-
}
|
818
|
+
f"\n`min_value` has {type(min_value).__name__} type."
|
819
|
+
f"\n`max_value` has {type(max_value).__name__} type."
|
820
|
+
f"\n`step` has {type(step).__name__} type."
|
826
821
|
)
|
822
|
+
raise StreamlitAPIException(msg)
|
827
823
|
|
828
824
|
# Ensure that the value matches arguments' types.
|
829
825
|
all_ints = data_type == SliderProto.INT and int_args
|
@@ -831,17 +827,13 @@ class SliderMixin:
|
|
831
827
|
all_timelikes = data_type in TIMELIKE_TYPES and timelike_args
|
832
828
|
|
833
829
|
if not all_ints and not all_floats and not all_timelikes:
|
834
|
-
|
830
|
+
msg = (
|
835
831
|
"Both value and arguments must be of the same type."
|
836
|
-
"\n`value` has
|
837
|
-
"\n`min_value` has
|
838
|
-
"\n`max_value` has
|
839
|
-
% {
|
840
|
-
"value_type": type(value).__name__,
|
841
|
-
"min_type": type(min_value).__name__,
|
842
|
-
"max_type": type(max_value).__name__,
|
843
|
-
}
|
832
|
+
f"\n`value` has {type(value).__name__} type."
|
833
|
+
f"\n`min_value` has {type(min_value).__name__} type."
|
834
|
+
f"\n`max_value` has {type(max_value).__name__} type."
|
844
835
|
)
|
836
|
+
raise StreamlitAPIException(msg)
|
845
837
|
|
846
838
|
# Ensure that min <= value(s) <= max, adjusting the bounds as necessary.
|
847
839
|
min_value = min(min_value, max_value)
|
@@ -369,8 +369,7 @@ class TextWidgetsMixin:
|
|
369
369
|
text_input_proto.type = TextInputProto.PASSWORD
|
370
370
|
else:
|
371
371
|
raise StreamlitAPIException(
|
372
|
-
"'
|
373
|
-
% type
|
372
|
+
f"'{type}' is not a valid text_input type. Valid types are 'default' and 'password'."
|
374
373
|
)
|
375
374
|
|
376
375
|
# Marshall the autocomplete param. If unspecified, this will be
|
@@ -42,7 +42,7 @@ def animation_demo() -> None:
|
|
42
42
|
for frame_num, a in enumerate(np.linspace(0.0, 4 * np.pi, 100)):
|
43
43
|
# Here were setting value for these two elements.
|
44
44
|
progress_bar.progress(frame_num)
|
45
|
-
frame_text.text("Frame
|
45
|
+
frame_text.text(f"Frame {frame_num + 1}/100")
|
46
46
|
|
47
47
|
# Performing some fractal wizardry.
|
48
48
|
c = separation * np.exp(1j * a)
|
streamlit/hello/mapping_demo.py
CHANGED
@@ -26,7 +26,7 @@ def mapping_demo() -> None:
|
|
26
26
|
def from_data_file(filename: str) -> pd.DataFrame:
|
27
27
|
url = (
|
28
28
|
"https://raw.githubusercontent.com/streamlit/"
|
29
|
-
"example-data/master/hello/v1
|
29
|
+
f"example-data/master/hello/v1/{filename}"
|
30
30
|
)
|
31
31
|
return pd.read_json(url)
|
32
32
|
|
@@ -95,11 +95,10 @@ def mapping_demo() -> None:
|
|
95
95
|
st.error("Please choose at least one layer above.")
|
96
96
|
except URLError as e:
|
97
97
|
st.error(
|
98
|
-
"""
|
98
|
+
f"""
|
99
99
|
**This demo requires internet access.**
|
100
|
-
Connection error:
|
100
|
+
Connection error: {e.reason}
|
101
101
|
"""
|
102
|
-
% e.reason
|
103
102
|
)
|
104
103
|
|
105
104
|
|
streamlit/logger.py
CHANGED
@@ -92,26 +92,25 @@ class UserHashError(StreamlitAPIException):
|
|
92
92
|
args = self._get_error_message_args(orig_exc, cached_func)
|
93
93
|
|
94
94
|
return (
|
95
|
-
"""
|
96
|
-
|
95
|
+
f"""
|
96
|
+
{args["orig_exception_desc"]}
|
97
97
|
|
98
|
-
This error is likely due to a bug in
|
99
|
-
user-defined hash function that was passed into the
|
100
|
-
|
98
|
+
This error is likely due to a bug in {args["hash_func_name"]}, which is a
|
99
|
+
user-defined hash function that was passed into the `{args["cache_primitive"]}` decorator of
|
100
|
+
{args["object_desc"]}.
|
101
101
|
|
102
|
-
|
103
|
-
|
102
|
+
{args["hash_func_name"]} failed when hashing an object of type
|
103
|
+
`{args["failed_obj_type_str"]}`. If you don't know where that object is coming from,
|
104
104
|
try looking at the hash chain below for an object that you do recognize, then
|
105
105
|
pass that to `hash_funcs` instead:
|
106
106
|
|
107
107
|
```
|
108
|
-
|
108
|
+
{args["hash_stack"]}
|
109
109
|
```
|
110
110
|
|
111
111
|
If you think this is actually a Streamlit bug, please
|
112
112
|
[file a bug report here](https://github.com/streamlit/streamlit/issues/new/choose).
|
113
113
|
"""
|
114
|
-
% args
|
115
114
|
).strip("\n")
|
116
115
|
|
117
116
|
def _get_error_message_args(
|
streamlit/runtime/credentials.py
CHANGED
@@ -263,41 +263,28 @@ class Credentials:
|
|
263
263
|
if self.activation.is_valid:
|
264
264
|
self.save()
|
265
265
|
# IMPORTANT: Break the text below at 80 chars.
|
266
|
-
TELEMETRY_TEXT = """
|
267
|
-
You can find our privacy policy at
|
266
|
+
TELEMETRY_TEXT = f"""
|
267
|
+
You can find our privacy policy at {cli_util.style_for_cli("https://streamlit.io/privacy-policy", underline=True)}
|
268
268
|
|
269
269
|
Summary:
|
270
270
|
- This open source library collects usage statistics.
|
271
271
|
- We cannot see and do not store information contained inside Streamlit apps,
|
272
272
|
such as text, charts, images, etc.
|
273
273
|
- Telemetry data is stored in servers in the United States.
|
274
|
-
- If you'd like to opt out, add the following to
|
274
|
+
- If you'd like to opt out, add the following to {cli_util.style_for_cli(_CONFIG_FILE_PATH)},
|
275
275
|
creating that file if necessary:
|
276
276
|
|
277
277
|
[browser]
|
278
278
|
gatherUsageStats = false
|
279
|
-
"""
|
280
|
-
"link": cli_util.style_for_cli(
|
281
|
-
"https://streamlit.io/privacy-policy", underline=True
|
282
|
-
),
|
283
|
-
"config": cli_util.style_for_cli(_CONFIG_FILE_PATH),
|
284
|
-
}
|
279
|
+
"""
|
285
280
|
|
286
281
|
cli_util.print_to_cli(TELEMETRY_TEXT)
|
287
282
|
if show_instructions:
|
288
283
|
# IMPORTANT: Break the text below at 80 chars.
|
289
|
-
INSTRUCTIONS_TEXT = """
|
290
|
-
|
291
|
-
|
292
|
-
"""
|
293
|
-
"start": cli_util.style_for_cli(
|
294
|
-
"Get started by typing:", fg="blue", bold=True
|
295
|
-
),
|
296
|
-
"prompt": cli_util.style_for_cli("$", fg="blue"),
|
297
|
-
"hello": cli_util.style_for_cli(
|
298
|
-
"streamlit hello", bold=True
|
299
|
-
),
|
300
|
-
}
|
284
|
+
INSTRUCTIONS_TEXT = f"""
|
285
|
+
{cli_util.style_for_cli("Get started by typing:", fg="blue", bold=True)}
|
286
|
+
{cli_util.style_for_cli("$", fg="blue")} {cli_util.style_for_cli("streamlit hello", bold=True)}
|
287
|
+
"""
|
301
288
|
|
302
289
|
cli_util.print_to_cli(INSTRUCTIONS_TEXT)
|
303
290
|
activated = True
|
streamlit/static/index.html
CHANGED
@@ -51,7 +51,7 @@
|
|
51
51
|
<script>
|
52
52
|
window.prerenderReady = false
|
53
53
|
</script>
|
54
|
-
<script type="module" crossorigin src="./static/js/index.
|
54
|
+
<script type="module" crossorigin src="./static/js/index.YePOPnW6.js"></script>
|
55
55
|
<link rel="stylesheet" crossorigin href="./static/css/index.C6rq3aMZ.css">
|
56
56
|
</head>
|
57
57
|
<body>
|
@@ -1 +1 @@
|
|
1
|
-
import{r,E as a,_ as n}from"./index.
|
1
|
+
import{r,E as a,_ as n}from"./index.YePOPnW6.js";var i=r.forwardRef(function(e,t){var o={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return r.createElement(a,n({iconAttrs:o,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},e,{ref:t}),r.createElement("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}))});i.displayName="ErrorOutline";export{i as E};
|
@@ -1 +1 @@
|
|
1
|
-
import{r as e,E as n,_ as a}from"./index.
|
1
|
+
import{r as e,E as n,_ as a}from"./index.YePOPnW6.js";var o=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("path",{fill:"none",d:"M0 0h24v24H0V0z"}),e.createElement("path",{d:"M16 9v10H8V9h8m-1.5-6h-5l-1 1H5v2h14V4h-3.5l-1-1zM18 7H6v12c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7z"}))});o.displayName="Delete";var i=e.forwardRef(function(t,r){var l={fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"};return e.createElement(n,a({iconAttrs:l,iconVerticalAlign:"middle",iconViewBox:"0 0 24 24"},t,{ref:r}),e.createElement("rect",{width:24,height:24,fill:"none"}),e.createElement("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3h-2zm-1-4l-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5 5-5z"}))});i.displayName="FileDownload";export{o as D,i as F};
|