streamlit-nightly 1.31.2.dev20240219__py2.py3-none-any.whl → 1.31.2.dev20240221__py2.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/__init__.py +1 -0
- streamlit/delta_generator.py +4 -0
- streamlit/elements/layouts.py +117 -12
- streamlit/proto/Block_pb2.py +22 -20
- streamlit/proto/Block_pb2.pyi +28 -3
- streamlit/runtime/scriptrunner/script_runner.py +5 -6
- streamlit/static/asset-manifest.json +2 -2
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/main.c1c90505.js +2 -0
- streamlit/testing/v1/app_test.py +38 -11
- streamlit/testing/v1/local_script_runner.py +11 -0
- {streamlit_nightly-1.31.2.dev20240219.dist-info → streamlit_nightly-1.31.2.dev20240221.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.31.2.dev20240219.dist-info → streamlit_nightly-1.31.2.dev20240221.dist-info}/RECORD +18 -18
- streamlit/static/static/js/main.18f7df63.js +0 -2
- /streamlit/static/static/js/{main.18f7df63.js.LICENSE.txt → main.c1c90505.js.LICENSE.txt} +0 -0
- {streamlit_nightly-1.31.2.dev20240219.data → streamlit_nightly-1.31.2.dev20240221.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.31.2.dev20240219.dist-info → streamlit_nightly-1.31.2.dev20240221.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.31.2.dev20240219.dist-info → streamlit_nightly-1.31.2.dev20240221.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.31.2.dev20240219.dist-info → streamlit_nightly-1.31.2.dev20240221.dist-info}/top_level.txt +0 -0
streamlit/__init__.py
CHANGED
streamlit/delta_generator.py
CHANGED
@@ -610,6 +610,10 @@ class DeltaGenerator(
|
|
610
610
|
raise StreamlitAPIException(
|
611
611
|
"Expanders may not be nested inside other expanders."
|
612
612
|
)
|
613
|
+
if block_type == "popover" and block_type in frozenset(parent_block_types):
|
614
|
+
raise StreamlitAPIException(
|
615
|
+
"Popovers may not be nested inside other popovers."
|
616
|
+
)
|
613
617
|
|
614
618
|
if dg._root_container is None or dg._cursor is None:
|
615
619
|
return dg
|
streamlit/elements/layouts.py
CHANGED
@@ -40,7 +40,7 @@ class LayoutsMixin:
|
|
40
40
|
multiple elements. This allows you to, for example, insert multiple
|
41
41
|
elements into your app out of order.
|
42
42
|
|
43
|
-
To add elements to the returned container, you can use "with" notation
|
43
|
+
To add elements to the returned container, you can use the "with" notation
|
44
44
|
(preferred) or just call methods directly on the returned object. See
|
45
45
|
examples below.
|
46
46
|
|
@@ -141,7 +141,6 @@ class LayoutsMixin:
|
|
141
141
|
|
142
142
|
return self.dg._block(block_proto)
|
143
143
|
|
144
|
-
# TODO: Enforce that columns are not nested or in Sidebar
|
145
144
|
@gather_metrics("columns")
|
146
145
|
def columns(
|
147
146
|
self, spec: SpecType, *, gap: str | None = "small"
|
@@ -151,7 +150,7 @@ class LayoutsMixin:
|
|
151
150
|
Inserts a number of multi-element containers laid out side-by-side and
|
152
151
|
returns a list of container objects.
|
153
152
|
|
154
|
-
To add elements to the returned containers, you can use "with" notation
|
153
|
+
To add elements to the returned containers, you can use the "with" notation
|
155
154
|
(preferred) or just call methods directly on the returned object. See
|
156
155
|
examples below.
|
157
156
|
|
@@ -183,7 +182,7 @@ class LayoutsMixin:
|
|
183
182
|
|
184
183
|
Examples
|
185
184
|
--------
|
186
|
-
You can use `with` notation to insert any element into a column:
|
185
|
+
You can use the `with` notation to insert any element into a column:
|
187
186
|
|
188
187
|
>>> import streamlit as st
|
189
188
|
>>>
|
@@ -205,7 +204,7 @@ class LayoutsMixin:
|
|
205
204
|
https://doc-columns1.streamlit.app/
|
206
205
|
height: 620px
|
207
206
|
|
208
|
-
Or you can just call methods directly
|
207
|
+
Or you can just call methods directly on the returned objects:
|
209
208
|
|
210
209
|
>>> import streamlit as st
|
211
210
|
>>> import numpy as np
|
@@ -277,7 +276,7 @@ class LayoutsMixin:
|
|
277
276
|
Tabs are a navigational element that allows users to easily
|
278
277
|
move between groups of related content.
|
279
278
|
|
280
|
-
To add elements to the returned containers, you can use "with" notation
|
279
|
+
To add elements to the returned containers, you can use the "with" notation
|
281
280
|
(preferred) or just call methods directly on the returned object. See
|
282
281
|
examples below.
|
283
282
|
|
@@ -318,7 +317,7 @@ class LayoutsMixin:
|
|
318
317
|
|
319
318
|
Examples
|
320
319
|
--------
|
321
|
-
You can use `with` notation to insert any element into a tab:
|
320
|
+
You can use test `with` notation to insert any element into a tab:
|
322
321
|
|
323
322
|
>>> import streamlit as st
|
324
323
|
>>>
|
@@ -340,7 +339,7 @@ class LayoutsMixin:
|
|
340
339
|
https://doc-tabs1.streamlit.app/
|
341
340
|
height: 620px
|
342
341
|
|
343
|
-
Or you can just call methods directly
|
342
|
+
Or you can just call methods directly on the returned objects:
|
344
343
|
|
345
344
|
>>> import streamlit as st
|
346
345
|
>>> import numpy as np
|
@@ -389,7 +388,7 @@ class LayoutsMixin:
|
|
389
388
|
and can be expanded or collapsed by the user. When collapsed, all that is
|
390
389
|
visible is the provided label.
|
391
390
|
|
392
|
-
To add elements to the returned container, you can use "with" notation
|
391
|
+
To add elements to the returned container, you can use the "with" notation
|
393
392
|
(preferred) or just call methods directly on the returned object. See
|
394
393
|
examples below.
|
395
394
|
|
@@ -426,7 +425,7 @@ class LayoutsMixin:
|
|
426
425
|
|
427
426
|
Examples
|
428
427
|
--------
|
429
|
-
You can use `with` notation to insert any element into an expander
|
428
|
+
You can use the `with` notation to insert any element into an expander
|
430
429
|
|
431
430
|
>>> import streamlit as st
|
432
431
|
>>>
|
@@ -444,7 +443,7 @@ class LayoutsMixin:
|
|
444
443
|
https://doc-expander.streamlit.app/
|
445
444
|
height: 750px
|
446
445
|
|
447
|
-
Or you can just call methods directly
|
446
|
+
Or you can just call methods directly on the returned objects:
|
448
447
|
|
449
448
|
>>> import streamlit as st
|
450
449
|
>>>
|
@@ -476,6 +475,112 @@ class LayoutsMixin:
|
|
476
475
|
|
477
476
|
return self.dg._block(block_proto=block_proto)
|
478
477
|
|
478
|
+
@gather_metrics("popover")
|
479
|
+
def popover(
|
480
|
+
self,
|
481
|
+
label: str,
|
482
|
+
*,
|
483
|
+
help: str | None = None,
|
484
|
+
disabled: bool = False,
|
485
|
+
use_container_width: bool = False,
|
486
|
+
) -> "DeltaGenerator":
|
487
|
+
r"""Insert a popover container.
|
488
|
+
|
489
|
+
Inserts a multi-element container as a popover. It consists of a button-like
|
490
|
+
element and a container that opens when the button is clicked.
|
491
|
+
|
492
|
+
To add elements to the returned container, you can use the "with"
|
493
|
+
notation (preferred) or just call methods directly on the returned object.
|
494
|
+
See examples below.
|
495
|
+
|
496
|
+
.. warning::
|
497
|
+
You may not put a popover inside another popover.
|
498
|
+
|
499
|
+
Parameters
|
500
|
+
----------
|
501
|
+
label : str
|
502
|
+
The label of the button that opens the popover container.
|
503
|
+
The label can optionally contain Markdown and supports the
|
504
|
+
following elements: Bold, Italics, Strikethroughs, Inline Code,
|
505
|
+
Emojis, and Links.
|
506
|
+
|
507
|
+
This also supports:
|
508
|
+
|
509
|
+
* Emoji shortcodes, such as ``:+1:`` and ``:sunglasses:``.
|
510
|
+
For a list of all supported codes,
|
511
|
+
see https://share.streamlit.io/streamlit/emoji-shortcodes.
|
512
|
+
|
513
|
+
* LaTeX expressions, by wrapping them in "$" or "$$" (the "$$"
|
514
|
+
must be on their own lines). Supported LaTeX functions are listed
|
515
|
+
at https://katex.org/docs/supported.html.
|
516
|
+
|
517
|
+
* Colored text, using the syntax ``:color[text to be colored]``,
|
518
|
+
where ``color`` needs to be replaced with any of the following
|
519
|
+
supported colors: blue, green, orange, red, violet, gray/grey, rainbow.
|
520
|
+
|
521
|
+
Unsupported elements are unwrapped so only their children (text contents) render.
|
522
|
+
Display unsupported elements as literal characters by
|
523
|
+
backslash-escaping them. E.g. ``1\. Not an ordered list``.
|
524
|
+
|
525
|
+
help : str
|
526
|
+
An optional tooltip that gets displayed when the popover button is
|
527
|
+
hovered over.
|
528
|
+
|
529
|
+
disabled : bool
|
530
|
+
An optional boolean, which disables the popover button if set to
|
531
|
+
True. The default is False.
|
532
|
+
|
533
|
+
use_container_width : bool
|
534
|
+
An optional boolean, which makes the popover button stretch its width
|
535
|
+
to match the parent container. This only affects the button and not
|
536
|
+
the width of the popover container.
|
537
|
+
|
538
|
+
Examples
|
539
|
+
--------
|
540
|
+
You can use the `with` notation to insert any element into a popover
|
541
|
+
|
542
|
+
>>> import streamlit as st
|
543
|
+
>>>
|
544
|
+
>>> with st.popover("Open popover"):
|
545
|
+
>>> st.markdown("Hello World 👋")
|
546
|
+
>>> name = st.text_input("What's your name?")
|
547
|
+
>>>
|
548
|
+
>>> st.write("Your name:", name)
|
549
|
+
|
550
|
+
.. output ::
|
551
|
+
https://doc-popover.streamlit.app/
|
552
|
+
height: 400px
|
553
|
+
|
554
|
+
Or you can just call methods directly on the returned objects:
|
555
|
+
|
556
|
+
>>> import streamlit as st
|
557
|
+
>>>
|
558
|
+
>>> popover = st.popover("Open popover")
|
559
|
+
>>> popover.markdown("Hello World 👋")
|
560
|
+
>>> name = popover.text_input("What's your name?")
|
561
|
+
>>>
|
562
|
+
>>> st.write("Your name:", name)
|
563
|
+
|
564
|
+
.. output ::
|
565
|
+
https://doc-popover.streamlit.app/
|
566
|
+
height: 400px
|
567
|
+
"""
|
568
|
+
if label is None:
|
569
|
+
raise StreamlitAPIException("A label is required for a popover")
|
570
|
+
|
571
|
+
popover_proto = BlockProto.Popover()
|
572
|
+
popover_proto.label = label
|
573
|
+
popover_proto.use_container_width = use_container_width
|
574
|
+
popover_proto.disabled = disabled
|
575
|
+
if help:
|
576
|
+
popover_proto.help = str(help)
|
577
|
+
|
578
|
+
block_proto = BlockProto()
|
579
|
+
block_proto.allow_empty = True
|
580
|
+
block_proto.popover.CopyFrom(popover_proto)
|
581
|
+
|
582
|
+
return self.dg._block(block_proto=block_proto)
|
583
|
+
|
479
584
|
@gather_metrics("status")
|
480
585
|
def status(
|
481
586
|
self,
|
@@ -550,7 +655,7 @@ class LayoutsMixin:
|
|
550
655
|
Examples
|
551
656
|
--------
|
552
657
|
|
553
|
-
You can use `with` notation to insert any element into an status container:
|
658
|
+
You can use the `with` notation to insert any element into an status container:
|
554
659
|
|
555
660
|
>>> import time
|
556
661
|
>>> import streamlit as st
|
streamlit/proto/Block_pb2.py
CHANGED
@@ -13,7 +13,7 @@ _sym_db = _symbol_database.Default()
|
|
13
13
|
|
14
14
|
|
15
15
|
|
16
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\"\
|
16
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\"\xfd\x06\n\x05\x42lock\x12#\n\x08vertical\x18\x01 \x01(\x0b\x32\x0f.Block.VerticalH\x00\x12\'\n\nhorizontal\x18\x02 \x01(\x0b\x32\x11.Block.HorizontalH\x00\x12\x1f\n\x06\x63olumn\x18\x03 \x01(\x0b\x32\r.Block.ColumnH\x00\x12\'\n\nexpandable\x18\x04 \x01(\x0b\x32\x11.Block.ExpandableH\x00\x12\x1b\n\x04\x66orm\x18\x05 \x01(\x0b\x32\x0b.Block.FormH\x00\x12,\n\rtab_container\x18\x06 \x01(\x0b\x32\x13.Block.TabContainerH\x00\x12\x19\n\x03tab\x18\x07 \x01(\x0b\x32\n.Block.TabH\x00\x12*\n\x0c\x63hat_message\x18\t \x01(\x0b\x32\x12.Block.ChatMessageH\x00\x12!\n\x07popover\x18\n \x01(\x0b\x32\x0e.Block.PopoverH\x00\x12\x13\n\x0b\x61llow_empty\x18\x08 \x01(\x08\x1a*\n\x08Vertical\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12\x0e\n\x06height\x18\x02 \x01(\r\x1a\x19\n\nHorizontal\x12\x0b\n\x03gap\x18\x01 \x01(\t\x1a%\n\x06\x43olumn\x12\x0e\n\x06weight\x18\x01 \x01(\x01\x12\x0b\n\x03gap\x18\x02 \x01(\t\x1aM\n\nExpandable\x12\r\n\x05label\x18\x01 \x01(\t\x12\x15\n\x08\x65xpanded\x18\x02 \x01(\x08H\x00\x88\x01\x01\x12\x0c\n\x04icon\x18\x03 \x01(\tB\x0b\n\t_expanded\x1a@\n\x04\x46orm\x12\x0f\n\x07\x66orm_id\x18\x01 \x01(\t\x12\x17\n\x0f\x63lear_on_submit\x18\x02 \x01(\x08\x12\x0e\n\x06\x62order\x18\x03 \x01(\x08\x1a\x0e\n\x0cTabContainer\x1a\x14\n\x03Tab\x12\r\n\x05label\x18\x01 \x01(\t\x1aU\n\x07Popover\x12\r\n\x05label\x18\x01 \x01(\t\x12\x1b\n\x13use_container_width\x18\x02 \x01(\x08\x12\x0c\n\x04help\x18\x03 \x01(\t\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x1a\x8d\x01\n\x0b\x43hatMessage\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0e\n\x06\x61vatar\x18\x02 \x01(\t\x12\x32\n\x0b\x61vatar_type\x18\x03 \x01(\x0e\x32\x1d.Block.ChatMessage.AvatarType\",\n\nAvatarType\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05\x45MOJI\x10\x01\x12\x08\n\x04ICON\x10\x02\x42\x06\n\x04typeB*\n\x1c\x63om.snowflake.apps.streamlitB\nBlockProtob\x06proto3')
|
17
17
|
|
18
18
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
19
19
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Block_pb2', globals())
|
@@ -22,23 +22,25 @@ if _descriptor._USE_C_DESCRIPTORS == False:
|
|
22
22
|
DESCRIPTOR._options = None
|
23
23
|
DESCRIPTOR._serialized_options = b'\n\034com.snowflake.apps.streamlitB\nBlockProto'
|
24
24
|
_BLOCK._serialized_start=32
|
25
|
-
_BLOCK._serialized_end=
|
26
|
-
_BLOCK_VERTICAL._serialized_start=
|
27
|
-
_BLOCK_VERTICAL._serialized_end=
|
28
|
-
_BLOCK_HORIZONTAL._serialized_start=
|
29
|
-
_BLOCK_HORIZONTAL._serialized_end=
|
30
|
-
_BLOCK_COLUMN._serialized_start=
|
31
|
-
_BLOCK_COLUMN._serialized_end=
|
32
|
-
_BLOCK_EXPANDABLE._serialized_start=
|
33
|
-
_BLOCK_EXPANDABLE._serialized_end=
|
34
|
-
_BLOCK_FORM._serialized_start=
|
35
|
-
_BLOCK_FORM._serialized_end=
|
36
|
-
_BLOCK_TABCONTAINER._serialized_start=
|
37
|
-
_BLOCK_TABCONTAINER._serialized_end=
|
38
|
-
_BLOCK_TAB._serialized_start=
|
39
|
-
_BLOCK_TAB._serialized_end=
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
25
|
+
_BLOCK._serialized_end=925
|
26
|
+
_BLOCK_VERTICAL._serialized_start=395
|
27
|
+
_BLOCK_VERTICAL._serialized_end=437
|
28
|
+
_BLOCK_HORIZONTAL._serialized_start=439
|
29
|
+
_BLOCK_HORIZONTAL._serialized_end=464
|
30
|
+
_BLOCK_COLUMN._serialized_start=466
|
31
|
+
_BLOCK_COLUMN._serialized_end=503
|
32
|
+
_BLOCK_EXPANDABLE._serialized_start=505
|
33
|
+
_BLOCK_EXPANDABLE._serialized_end=582
|
34
|
+
_BLOCK_FORM._serialized_start=584
|
35
|
+
_BLOCK_FORM._serialized_end=648
|
36
|
+
_BLOCK_TABCONTAINER._serialized_start=650
|
37
|
+
_BLOCK_TABCONTAINER._serialized_end=664
|
38
|
+
_BLOCK_TAB._serialized_start=666
|
39
|
+
_BLOCK_TAB._serialized_end=686
|
40
|
+
_BLOCK_POPOVER._serialized_start=688
|
41
|
+
_BLOCK_POPOVER._serialized_end=773
|
42
|
+
_BLOCK_CHATMESSAGE._serialized_start=776
|
43
|
+
_BLOCK_CHATMESSAGE._serialized_end=917
|
44
|
+
_BLOCK_CHATMESSAGE_AVATARTYPE._serialized_start=873
|
45
|
+
_BLOCK_CHATMESSAGE_AVATARTYPE._serialized_end=917
|
44
46
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Block_pb2.pyi
CHANGED
@@ -133,6 +133,27 @@ class Block(google.protobuf.message.Message):
|
|
133
133
|
) -> None: ...
|
134
134
|
def ClearField(self, field_name: typing_extensions.Literal["label", b"label"]) -> None: ...
|
135
135
|
|
136
|
+
class Popover(google.protobuf.message.Message):
|
137
|
+
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
138
|
+
|
139
|
+
LABEL_FIELD_NUMBER: builtins.int
|
140
|
+
USE_CONTAINER_WIDTH_FIELD_NUMBER: builtins.int
|
141
|
+
HELP_FIELD_NUMBER: builtins.int
|
142
|
+
DISABLED_FIELD_NUMBER: builtins.int
|
143
|
+
label: builtins.str
|
144
|
+
use_container_width: builtins.bool
|
145
|
+
help: builtins.str
|
146
|
+
disabled: builtins.bool
|
147
|
+
def __init__(
|
148
|
+
self,
|
149
|
+
*,
|
150
|
+
label: builtins.str = ...,
|
151
|
+
use_container_width: builtins.bool = ...,
|
152
|
+
help: builtins.str = ...,
|
153
|
+
disabled: builtins.bool = ...,
|
154
|
+
) -> None: ...
|
155
|
+
def ClearField(self, field_name: typing_extensions.Literal["disabled", b"disabled", "help", b"help", "label", b"label", "use_container_width", b"use_container_width"]) -> None: ...
|
156
|
+
|
136
157
|
class ChatMessage(google.protobuf.message.Message):
|
137
158
|
DESCRIPTOR: google.protobuf.descriptor.Descriptor
|
138
159
|
|
@@ -174,6 +195,7 @@ class Block(google.protobuf.message.Message):
|
|
174
195
|
TAB_CONTAINER_FIELD_NUMBER: builtins.int
|
175
196
|
TAB_FIELD_NUMBER: builtins.int
|
176
197
|
CHAT_MESSAGE_FIELD_NUMBER: builtins.int
|
198
|
+
POPOVER_FIELD_NUMBER: builtins.int
|
177
199
|
ALLOW_EMPTY_FIELD_NUMBER: builtins.int
|
178
200
|
@property
|
179
201
|
def vertical(self) -> global___Block.Vertical: ...
|
@@ -191,6 +213,8 @@ class Block(google.protobuf.message.Message):
|
|
191
213
|
def tab(self) -> global___Block.Tab: ...
|
192
214
|
@property
|
193
215
|
def chat_message(self) -> global___Block.ChatMessage: ...
|
216
|
+
@property
|
217
|
+
def popover(self) -> global___Block.Popover: ...
|
194
218
|
allow_empty: builtins.bool
|
195
219
|
def __init__(
|
196
220
|
self,
|
@@ -203,10 +227,11 @@ class Block(google.protobuf.message.Message):
|
|
203
227
|
tab_container: global___Block.TabContainer | None = ...,
|
204
228
|
tab: global___Block.Tab | None = ...,
|
205
229
|
chat_message: global___Block.ChatMessage | None = ...,
|
230
|
+
popover: global___Block.Popover | None = ...,
|
206
231
|
allow_empty: builtins.bool = ...,
|
207
232
|
) -> None: ...
|
208
|
-
def HasField(self, field_name: typing_extensions.Literal["chat_message", b"chat_message", "column", b"column", "expandable", b"expandable", "form", b"form", "horizontal", b"horizontal", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> builtins.bool: ...
|
209
|
-
def ClearField(self, field_name: typing_extensions.Literal["allow_empty", b"allow_empty", "chat_message", b"chat_message", "column", b"column", "expandable", b"expandable", "form", b"form", "horizontal", b"horizontal", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> None: ...
|
210
|
-
def WhichOneof(self, oneof_group: typing_extensions.Literal["type", b"type"]) -> typing_extensions.Literal["vertical", "horizontal", "column", "expandable", "form", "tab_container", "tab", "chat_message"] | None: ...
|
233
|
+
def HasField(self, field_name: typing_extensions.Literal["chat_message", b"chat_message", "column", b"column", "expandable", b"expandable", "form", b"form", "horizontal", b"horizontal", "popover", b"popover", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> builtins.bool: ...
|
234
|
+
def ClearField(self, field_name: typing_extensions.Literal["allow_empty", b"allow_empty", "chat_message", b"chat_message", "column", b"column", "expandable", b"expandable", "form", b"form", "horizontal", b"horizontal", "popover", b"popover", "tab", b"tab", "tab_container", b"tab_container", "type", b"type", "vertical", b"vertical"]) -> None: ...
|
235
|
+
def WhichOneof(self, oneof_group: typing_extensions.Literal["type", b"type"]) -> typing_extensions.Literal["vertical", "horizontal", "column", "expandable", "form", "tab_container", "tab", "chat_message", "popover"] | None: ...
|
211
236
|
|
212
237
|
global___Block = Block
|
@@ -512,7 +512,7 @@ class ScriptRunner:
|
|
512
512
|
# ...
|
513
513
|
# ```
|
514
514
|
# in their scripts.
|
515
|
-
module = _new_module("__main__")
|
515
|
+
module = self._new_module("__main__")
|
516
516
|
|
517
517
|
# Install the fake module as the __main__ module. This allows
|
518
518
|
# the pickle module to work inside the user's code, since it now
|
@@ -626,6 +626,10 @@ class ScriptRunner:
|
|
626
626
|
if config.get_option("runner.postScriptGC"):
|
627
627
|
gc.collect(2)
|
628
628
|
|
629
|
+
def _new_module(self, name: str) -> types.ModuleType:
|
630
|
+
"""Create a new module with the given name."""
|
631
|
+
return types.ModuleType(name)
|
632
|
+
|
629
633
|
|
630
634
|
class ScriptControlException(BaseException):
|
631
635
|
"""Base exception for ScriptRunner."""
|
@@ -676,11 +680,6 @@ def _clean_problem_modules() -> None:
|
|
676
680
|
pass
|
677
681
|
|
678
682
|
|
679
|
-
def _new_module(name: str) -> types.ModuleType:
|
680
|
-
"""Create a new module with the given name."""
|
681
|
-
return types.ModuleType(name)
|
682
|
-
|
683
|
-
|
684
683
|
# The reason this is not a decorator is because we want to make it clear at the
|
685
684
|
# calling location that this function is being used.
|
686
685
|
def _log_if_error(fn: Callable[[], None]) -> None:
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"files": {
|
3
3
|
"main.css": "./static/css/main.77d1c464.css",
|
4
|
-
"main.js": "./static/js/main.
|
4
|
+
"main.js": "./static/js/main.c1c90505.js",
|
5
5
|
"static/js/9336.2d95d840.chunk.js": "./static/js/9336.2d95d840.chunk.js",
|
6
6
|
"static/js/9330.c0dd1723.chunk.js": "./static/js/9330.c0dd1723.chunk.js",
|
7
7
|
"static/js/7217.d970c074.chunk.js": "./static/js/7217.d970c074.chunk.js",
|
@@ -150,6 +150,6 @@
|
|
150
150
|
},
|
151
151
|
"entrypoints": [
|
152
152
|
"static/css/main.77d1c464.css",
|
153
|
-
"static/js/main.
|
153
|
+
"static/js/main.c1c90505.js"
|
154
154
|
]
|
155
155
|
}
|
streamlit/static/index.html
CHANGED
@@ -1 +1 @@
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"/><link rel="shortcut icon" href="./favicon.png"/><link rel="preload" href="./static/media/SourceSansPro-Regular.0d69e5ff5e92ac64a0c9.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-SemiBold.abed79cd0df1827e18cf.woff2" as="font" type="font/woff2" crossorigin><link rel="preload" href="./static/media/SourceSansPro-Bold.118dea98980e20a81ced.woff2" as="font" type="font/woff2" crossorigin><title>Streamlit</title><script>window.prerenderReady=!1</script><script defer="defer" src="./static/js/main.c1c90505.js"></script><link href="./static/css/main.77d1c464.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|