streamlit-nightly 1.45.1.dev20250511__py3-none-any.whl → 1.45.2.dev20250513__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/auth_util.py +6 -6
- streamlit/commands/echo.py +5 -3
- streamlit/commands/experimental_query_params.py +1 -1
- streamlit/commands/navigation.py +1 -4
- streamlit/components/v1/custom_component.py +2 -2
- streamlit/config.py +16 -18
- streamlit/config_util.py +6 -7
- streamlit/connections/sql_connection.py +1 -1
- streamlit/dataframe_util.py +50 -51
- streamlit/delta_generator.py +4 -1
- streamlit/deprecation_util.py +5 -5
- streamlit/elements/arrow.py +1 -1
- streamlit/elements/deck_gl_json_chart.py +1 -4
- streamlit/elements/doc_string.py +5 -10
- streamlit/elements/exception.py +5 -7
- streamlit/elements/layouts.py +4 -3
- streamlit/elements/lib/built_in_chart_utils.py +22 -22
- streamlit/elements/lib/pandas_styler_utils.py +6 -8
- streamlit/elements/lib/policies.py +1 -1
- streamlit/elements/map.py +2 -8
- streamlit/elements/markdown.py +1 -4
- streamlit/elements/media.py +50 -2
- streamlit/elements/metric.py +9 -10
- streamlit/elements/spinner.py +1 -1
- streamlit/elements/vega_charts.py +1 -1
- streamlit/elements/widgets/audio_input.py +1 -4
- streamlit/elements/widgets/camera_input.py +1 -4
- streamlit/elements/widgets/chat.py +52 -5
- streamlit/elements/widgets/data_editor.py +1 -1
- streamlit/elements/widgets/slider.py +4 -5
- streamlit/elements/widgets/time_widgets.py +1 -4
- streamlit/elements/write.py +2 -2
- streamlit/env_util.py +2 -7
- streamlit/error_util.py +15 -8
- streamlit/errors.py +11 -8
- streamlit/file_util.py +6 -3
- streamlit/git_util.py +26 -21
- streamlit/hello/dataframe_demo.py +1 -1
- streamlit/hello/mapping_demo.py +1 -1
- streamlit/hello/plotting_demo.py +3 -3
- streamlit/hello/streamlit_app.py +1 -1
- streamlit/hello/utils.py +2 -1
- streamlit/logger.py +4 -5
- streamlit/proto/Audio_pb2.py +4 -3
- streamlit/proto/Audio_pb2.pyi +8 -1
- streamlit/proto/Block_pb2.py +5 -5
- streamlit/proto/Block_pb2.pyi +7 -1
- streamlit/proto/ChatInput_pb2.py +8 -7
- streamlit/proto/ChatInput_pb2.pyi +10 -1
- streamlit/proto/Video_pb2.py +8 -7
- streamlit/proto/Video_pb2.pyi +8 -1
- streamlit/runtime/app_session.py +5 -5
- streamlit/runtime/caching/cache_data_api.py +2 -2
- streamlit/runtime/caching/cache_resource_api.py +1 -1
- streamlit/runtime/caching/cache_utils.py +3 -3
- streamlit/runtime/caching/hashing.py +10 -10
- streamlit/runtime/credentials.py +9 -8
- streamlit/runtime/forward_msg_queue.py +1 -1
- streamlit/runtime/memory_media_file_storage.py +5 -4
- streamlit/runtime/memory_uploaded_file_manager.py +1 -1
- streamlit/runtime/metrics_util.py +2 -2
- streamlit/runtime/runtime.py +1 -1
- streamlit/runtime/scriptrunner/exec_code.py +1 -1
- streamlit/runtime/scriptrunner/script_cache.py +1 -1
- streamlit/runtime/scriptrunner/script_runner.py +10 -3
- streamlit/runtime/scriptrunner_utils/script_requests.py +3 -3
- streamlit/runtime/scriptrunner_utils/script_run_context.py +3 -3
- streamlit/runtime/secrets.py +6 -7
- streamlit/runtime/state/query_params.py +3 -5
- streamlit/runtime/state/session_state.py +15 -15
- streamlit/runtime/stats.py +1 -1
- streamlit/static/index.html +1 -1
- streamlit/static/static/js/{ErrorOutline.esm.B5LmzpSn.js → ErrorOutline.esm.CxkgXqSh.js} +1 -1
- streamlit/static/static/js/{FileDownload.esm.BgWveG3s.js → FileDownload.esm.DVrjmwoh.js} +1 -1
- streamlit/static/static/js/{FileHelper.DepIpP48.js → FileHelper.CMA9s0t3.js} +1 -1
- streamlit/static/static/js/{FormClearHelper.C_BjP_35.js → FormClearHelper.Ca3GFjxv.js} +1 -1
- streamlit/static/static/js/{Hooks.BpH4YuRQ.js → Hooks.BpCPXt5n.js} +1 -1
- streamlit/static/static/js/{InputInstructions.CjdwGigq.js → InputInstructions.BO_BnHv5.js} +1 -1
- streamlit/static/static/js/{ProgressBar.D1hXcW3N.js → ProgressBar.Ctk1m4EX.js} +1 -1
- streamlit/static/static/js/{RenderInPortalIfExists.A1T2s6z-.js → RenderInPortalIfExists.kuKoxpXt.js} +1 -1
- streamlit/static/static/js/{Toolbar.y7vr7z0G.js → Toolbar.Cde1fEcQ.js} +1 -1
- streamlit/static/static/js/{base-input.BKhd-BLG.js → base-input.BwCmIYba.js} +1 -1
- streamlit/static/static/js/{checkbox.DC-GFdrh.js → checkbox.CwPOyuag.js} +1 -1
- streamlit/static/static/js/{createSuper.D5WUtJEy.js → createSuper.BMtevhyt.js} +1 -1
- streamlit/static/static/js/{data-grid-overlay-editor.BPJ38mWp.js → data-grid-overlay-editor.gtfE9z1L.js} +1 -1
- streamlit/static/static/js/{downloader.C6a4LRBw.js → downloader.-58ZXBvx.js} +1 -1
- streamlit/static/static/js/{es6.DgMlYq8q.js → es6.6JpsZqpF.js} +2 -2
- streamlit/static/static/js/{iframeResizer.contentWindow.BpQxex73.js → iframeResizer.contentWindow.Dvm_jxul.js} +1 -1
- streamlit/static/static/js/{index.CiO2JPl_.js → index.9Bu4pGgs.js} +1 -1
- streamlit/static/static/js/{index.4Gtr9egA.js → index.B1T1N6vQ.js} +1 -1
- streamlit/static/static/js/{index.20fI9wQF.js → index.B9LBeTzL.js} +1 -1
- streamlit/static/static/js/{index.VPO2zcSN.js → index.BXdNB_A0.js} +1 -1
- streamlit/static/static/js/{index.sKXwUANU.js → index.Bd91GXu8.js} +1 -1
- streamlit/static/static/js/{index.DT0CWGt3.js → index.BdEKCy-o.js} +1 -1
- streamlit/static/static/js/{index.D3tgBU6x.js → index.BhODUTaJ.js} +1 -1
- streamlit/static/static/js/{index.BcbB70bz.js → index.BjtSRm-c.js} +1 -1
- streamlit/static/static/js/{index.DPiBGVm8.js → index.BnK8pWHN.js} +1 -1
- streamlit/static/static/js/{index.49Q6A5_9.js → index.C5xsotRs.js} +1 -1
- streamlit/static/static/js/{index.xIQLhQKv.js → index.CD3lJu6g.js} +1 -1
- streamlit/static/static/js/{index.BydIp_VR.js → index.CGJjlswG.js} +1 -1
- streamlit/static/static/js/{index.Bj81ZRkx.js → index.CIZd1q4K.js} +1 -1
- streamlit/static/static/js/{index.5k30-U6O.js → index.CZy9JHE4.js} +2 -2
- streamlit/static/static/js/{index.D5PANKHd.js → index.Ce-7kIl6.js} +1 -1
- streamlit/static/static/js/{index.Bo-z1JM2.js → index.CiiU1-bS.js} +1 -1
- streamlit/static/static/js/{index.Cqla7uBZ.js → index.ClE8XHxl.js} +1 -1
- streamlit/static/static/js/{index.CY8tg9lY.js → index.CvKH37SN.js} +1 -1
- streamlit/static/static/js/{index.CkBnHCIQ.js → index.D0G-y_z6.js} +1 -1
- streamlit/static/static/js/{index.B3UoUwtN.js → index.D1ccH_2Z.js} +1 -1
- streamlit/static/static/js/{index.DB42JCH0.js → index.D3ES4sSL.js} +1 -1
- streamlit/static/static/js/{index.BLpDfH1w.js → index.DJ0X7aeY.js} +1 -1
- streamlit/static/static/js/{index.BRN41-Jy.js → index.DNNQBTM6.js} +1 -1
- streamlit/static/static/js/{index.br6zwNIk.js → index.DQJE0i9s.js} +62 -62
- streamlit/static/static/js/{index.DSPS70gp.js → index.DR9ekgzX.js} +1 -1
- streamlit/static/static/js/{index.BbhQIRth.js → index.DUizq_aW.js} +1 -1
- streamlit/static/static/js/{index.ryD8hMpi.js → index.DVE5BhiT.js} +1 -1
- streamlit/static/static/js/{index.C2GjbQtf.js → index.DW60zbv4.js} +1 -1
- streamlit/static/static/js/{index.BhGEwO_d.js → index.DenamHJl.js} +1 -1
- streamlit/static/static/js/{index._oOkpIXS.js → index.DgnhzFgr.js} +1 -1
- streamlit/static/static/js/{index.CHnID3dI.js → index.Dk_aZplH.js} +1 -1
- streamlit/static/static/js/index.Dqcp7EZB.js +779 -0
- streamlit/static/static/js/{index.DAO4Lj-D.js → index.NfOJ2GJ6.js} +1 -1
- streamlit/static/static/js/{index.CcvbHTJu.js → index.WVgPkrrw.js} +1 -1
- streamlit/static/static/js/{index.Du1Pbz0y.js → index.bkU6rhIM.js} +1 -1
- streamlit/static/static/js/{index.Cfi3u2-T.js → index.hQ5adhxG.js} +1 -1
- streamlit/static/static/js/{index.B8ca7fYO.js → index.lYSTjxV_.js} +1 -1
- streamlit/static/static/js/{input.CNjMviuo.js → input.JEUWF6Z-.js} +1 -1
- streamlit/static/static/js/{memory.f8X97LPt.js → memory.BToPJrCN.js} +1 -1
- streamlit/static/static/js/{mergeWith.DU9BO8BA.js → mergeWith.DGon2YId.js} +1 -1
- streamlit/static/static/js/{number-overlay-editor.xJPBNdGQ.js → number-overlay-editor.kqkFTYSn.js} +1 -1
- streamlit/static/static/js/{possibleConstructorReturn.BjPX9m9m.js → possibleConstructorReturn.twGQoCQl.js} +1 -1
- streamlit/static/static/js/{sandbox.B23JuuVd.js → sandbox.o85HOKwq.js} +1 -1
- streamlit/static/static/js/{textarea.DodnI6GX.js → textarea.CdOYpTta.js} +1 -1
- streamlit/static/static/js/{timepicker.ClHKNfP9.js → timepicker.Cy1BKBo3.js} +1 -1
- streamlit/static/static/js/{toConsumableArray.CK6YGgcW.js → toConsumableArray.BVXfsvDc.js} +1 -1
- streamlit/static/static/js/{uniqueId.BAAVLIKj.js → uniqueId.Dz7-nY8K.js} +1 -1
- streamlit/static/static/js/{useBasicWidgetState.B1oropKY.js → useBasicWidgetState.CeKdNkz-.js} +1 -1
- streamlit/static/static/js/{useOnInputChange.CHQJz2sf.js → useOnInputChange.CM8BtP-c.js} +1 -1
- streamlit/static/static/js/{withFullScreenWrapper.DZ1W8JUx.js → withFullScreenWrapper.DuyW554J.js} +1 -1
- streamlit/string_util.py +1 -4
- streamlit/temporary_directory.py +2 -2
- streamlit/testing/v1/app_test.py +2 -2
- streamlit/testing/v1/element_tree.py +10 -9
- streamlit/testing/v1/local_script_runner.py +1 -4
- streamlit/type_util.py +2 -5
- streamlit/watcher/folder_black_list.py +1 -1
- streamlit/watcher/local_sources_watcher.py +5 -3
- streamlit/watcher/path_watcher.py +3 -6
- streamlit/watcher/polling_path_watcher.py +8 -7
- streamlit/watcher/util.py +6 -5
- streamlit/web/bootstrap.py +4 -4
- streamlit/web/cli.py +13 -13
- streamlit/web/server/app_static_file_handler.py +1 -1
- streamlit/web/server/authlib_tornado_integration.py +6 -1
- streamlit/web/server/oauth_authlib_routes.py +3 -3
- streamlit/web/server/oidc_mixin.py +15 -3
- streamlit/web/server/routes.py +11 -11
- streamlit/web/server/stats_request_handler.py +2 -2
- {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/METADATA +1 -1
- {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/RECORD +164 -164
- streamlit/static/static/js/index.BgEbLy94.js +0 -779
- {streamlit_nightly-1.45.1.dev20250511.data → streamlit_nightly-1.45.2.dev20250513.data}/scripts/streamlit.cmd +0 -0
- {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/WHEEL +0 -0
- {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/entry_points.txt +0 -0
- {streamlit_nightly-1.45.1.dev20250511.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/top_level.txt +0 -0
streamlit/env_util.py
CHANGED
@@ -31,9 +31,7 @@ def is_pex() -> bool:
|
|
31
31
|
Pex modifies sys.path so the pex file is the first path and that's
|
32
32
|
how we determine we're running in the pex file.
|
33
33
|
"""
|
34
|
-
|
35
|
-
return True
|
36
|
-
return False
|
34
|
+
return bool(re.match(r".*pex$", sys.path[0]))
|
37
35
|
|
38
36
|
|
39
37
|
def is_repl() -> bool:
|
@@ -48,10 +46,7 @@ def is_repl() -> bool:
|
|
48
46
|
|
49
47
|
# <stdin> is what the basic Python REPL calls the root frame's
|
50
48
|
# filename, and <string> is what iPython sometimes calls it.
|
51
|
-
|
52
|
-
return True
|
53
|
-
|
54
|
-
return False
|
49
|
+
return filename in ("<stdin>", "<string>")
|
55
50
|
|
56
51
|
|
57
52
|
def is_executable_in_path(name: str) -> bool:
|
streamlit/error_util.py
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
from __future__ import annotations
|
16
16
|
|
17
|
-
from typing import Final
|
17
|
+
from typing import Any, Final
|
18
18
|
|
19
19
|
import streamlit
|
20
20
|
from streamlit import config
|
@@ -26,17 +26,24 @@ _LOGGER: Final = get_logger(__name__)
|
|
26
26
|
|
27
27
|
|
28
28
|
def _print_rich_exception(e: BaseException) -> None:
|
29
|
-
from rich import
|
29
|
+
from rich.box import Box
|
30
|
+
from rich.panel import Panel
|
30
31
|
|
31
32
|
# Monkey patch the panel to use our custom box style
|
32
|
-
class ConfigurablePanel(
|
33
|
+
class ConfigurablePanel(Panel):
|
33
34
|
def __init__(
|
34
35
|
self,
|
35
|
-
renderable,
|
36
|
-
box=
|
37
|
-
**kwargs,
|
38
|
-
):
|
39
|
-
super().__init__(
|
36
|
+
renderable: Any,
|
37
|
+
box: Box | None = None,
|
38
|
+
**kwargs: Any,
|
39
|
+
) -> None:
|
40
|
+
super().__init__(
|
41
|
+
renderable,
|
42
|
+
box
|
43
|
+
if box is not None
|
44
|
+
else Box("────\n \n────\n \n────\n────\n \n────\n"),
|
45
|
+
**kwargs,
|
46
|
+
)
|
40
47
|
|
41
48
|
from rich import traceback as rich_traceback
|
42
49
|
|
streamlit/errors.py
CHANGED
@@ -20,6 +20,7 @@ from typing import TYPE_CHECKING, Any, Literal
|
|
20
20
|
from streamlit import util
|
21
21
|
|
22
22
|
if TYPE_CHECKING:
|
23
|
+
from collections.abc import Collection
|
23
24
|
from datetime import date, time
|
24
25
|
|
25
26
|
|
@@ -140,7 +141,7 @@ class StreamlitAPIWarning(StreamlitAPIException, Warning):
|
|
140
141
|
instead.
|
141
142
|
"""
|
142
143
|
|
143
|
-
def __init__(self, *args):
|
144
|
+
def __init__(self, *args: Any) -> None:
|
144
145
|
super().__init__(*args)
|
145
146
|
import inspect
|
146
147
|
import traceback
|
@@ -157,7 +158,7 @@ class StreamlitModuleNotFoundError(StreamlitAPIWarning):
|
|
157
158
|
that is not one of our core dependencies.
|
158
159
|
"""
|
159
160
|
|
160
|
-
def __init__(self, module_name, *args):
|
161
|
+
def __init__(self, module_name: str, *args: Any) -> None:
|
161
162
|
message = (
|
162
163
|
f'This Streamlit command requires module "{module_name}" to be installed.'
|
163
164
|
)
|
@@ -220,7 +221,7 @@ class StreamlitInvalidURLError(LocalizableStreamlitException):
|
|
220
221
|
class StreamlitInvalidColumnSpecError(LocalizableStreamlitException):
|
221
222
|
"""Exception raised when no weights are specified, or a negative weight is specified."""
|
222
223
|
|
223
|
-
def __init__(self):
|
224
|
+
def __init__(self) -> None:
|
224
225
|
super().__init__(
|
225
226
|
"The `spec` argument to `st.columns` must be either a "
|
226
227
|
"positive integer (number of columns) or a list of positive numbers (width ratios of the columns). "
|
@@ -245,7 +246,7 @@ class StreamlitInvalidColumnGapError(LocalizableStreamlitException):
|
|
245
246
|
|
246
247
|
def __init__(self, gap: str) -> None:
|
247
248
|
super().__init__(
|
248
|
-
'The `gap` argument to `st.columns` must be `"small"`, `"medium"`, or `"
|
249
|
+
'The `gap` argument to `st.columns` must be `"small"`, `"medium"`, `"large"`, or `"none"`. \n'
|
249
250
|
"The argument passed was {gap}.",
|
250
251
|
gap=gap,
|
251
252
|
)
|
@@ -370,7 +371,7 @@ class StreamlitInvalidNumberFormatError(LocalizableStreamlitException):
|
|
370
371
|
class StreamlitMissingPageLabelError(LocalizableStreamlitException):
|
371
372
|
"""Exception raised when a page_link is created without a label."""
|
372
373
|
|
373
|
-
def __init__(self):
|
374
|
+
def __init__(self) -> None:
|
374
375
|
super().__init__(
|
375
376
|
"The `label` param is required for external links used with `st.page_link` - please provide a `label`."
|
376
377
|
)
|
@@ -409,7 +410,7 @@ class StreamlitPageNotFoundError(LocalizableStreamlitException):
|
|
409
410
|
class StreamlitFragmentWidgetsNotAllowedOutsideError(LocalizableStreamlitException):
|
410
411
|
"""Exception raised when the fragment attempts to write to an element outside of its container."""
|
411
412
|
|
412
|
-
def __init__(self):
|
413
|
+
def __init__(self) -> None:
|
413
414
|
super().__init__("Fragments cannot write widgets to outside containers.")
|
414
415
|
|
415
416
|
|
@@ -418,7 +419,7 @@ class StreamlitInvalidFormCallbackError(LocalizableStreamlitException):
|
|
418
419
|
the `st.form_submit_button`.
|
419
420
|
"""
|
420
421
|
|
421
|
-
def __init__(self):
|
422
|
+
def __init__(self) -> None:
|
422
423
|
super().__init__(
|
423
424
|
"Within a form, callbacks can only be defined on `st.form_submit_button`. "
|
424
425
|
"Defining callbacks on other widgets inside a form is not allowed."
|
@@ -436,7 +437,9 @@ class StreamlitValueAssignmentNotAllowedError(LocalizableStreamlitException):
|
|
436
437
|
|
437
438
|
|
438
439
|
class StreamlitInvalidColorError(LocalizableStreamlitException):
|
439
|
-
def __init__(
|
440
|
+
def __init__(
|
441
|
+
self, color: str | Collection[Any] | tuple[int, int, int, int]
|
442
|
+
) -> None:
|
440
443
|
super().__init__(
|
441
444
|
"This does not look like a valid color: {color}.\n\n"
|
442
445
|
"Colors must be in one of the following formats:"
|
streamlit/file_util.py
CHANGED
@@ -19,11 +19,14 @@ import errno
|
|
19
19
|
import io
|
20
20
|
import os
|
21
21
|
from pathlib import Path
|
22
|
-
from typing import Final
|
22
|
+
from typing import IO, TYPE_CHECKING, Any, Final
|
23
23
|
|
24
24
|
from streamlit import env_util, errors
|
25
25
|
from streamlit.string_util import is_binary_string
|
26
26
|
|
27
|
+
if TYPE_CHECKING:
|
28
|
+
from collections.abc import Generator
|
29
|
+
|
27
30
|
# Configuration and credentials are stored inside the ~/.streamlit folder
|
28
31
|
CONFIG_FOLDER_NAME: Final = ".streamlit"
|
29
32
|
|
@@ -63,7 +66,7 @@ def get_encoded_file_data(
|
|
63
66
|
|
64
67
|
|
65
68
|
@contextlib.contextmanager
|
66
|
-
def streamlit_read(path, binary=False):
|
69
|
+
def streamlit_read(path: str, binary: bool = False) -> Generator[IO[Any], None, None]:
|
67
70
|
"""Opens a context to read this file relative to the streamlit path.
|
68
71
|
|
69
72
|
For example:
|
@@ -88,7 +91,7 @@ def streamlit_read(path, binary=False):
|
|
88
91
|
|
89
92
|
|
90
93
|
@contextlib.contextmanager
|
91
|
-
def streamlit_write(path, binary=False):
|
94
|
+
def streamlit_write(path: str, binary: bool = False) -> Generator[IO[Any], None, None]:
|
92
95
|
"""Opens a file for writing within the streamlit path, and
|
93
96
|
ensuring that the path exists.
|
94
97
|
|
streamlit/git_util.py
CHANGED
@@ -16,10 +16,13 @@ from __future__ import annotations
|
|
16
16
|
|
17
17
|
import os
|
18
18
|
import re
|
19
|
-
from typing import
|
19
|
+
from typing import TYPE_CHECKING, cast
|
20
20
|
|
21
21
|
from streamlit import util
|
22
22
|
|
23
|
+
if TYPE_CHECKING:
|
24
|
+
from git import Commit, Remote, RemoteReference, Repo
|
25
|
+
|
23
26
|
# Github has two URLs, one that is https and one that is ssh
|
24
27
|
GITHUB_HTTP_URL = r"^https://(www\.)?github.com/(.+)/(.+)(?:.git)?$"
|
25
28
|
GITHUB_SSH_URL = r"^git@github.com:(.+)/(.+)(?:.git)?$"
|
@@ -31,7 +34,9 @@ MIN_GIT_VERSION = (2, 7, 0)
|
|
31
34
|
|
32
35
|
|
33
36
|
class GitRepo:
|
34
|
-
|
37
|
+
repo: Repo | None
|
38
|
+
|
39
|
+
def __init__(self, path: str) -> None:
|
35
40
|
# If we have a valid repo, git_version will be a tuple
|
36
41
|
# of 3+ ints: (major, minor, patch, possible_additional_patch_number)
|
37
42
|
self.git_version: tuple[int, ...] | None = None
|
@@ -39,11 +44,7 @@ class GitRepo:
|
|
39
44
|
try:
|
40
45
|
import git
|
41
46
|
|
42
|
-
|
43
|
-
# type errors on Mac and Linux. We bypass type checking entirely
|
44
|
-
# by redeclaring the `git` import as an "Any".
|
45
|
-
git_package: Any = git
|
46
|
-
self.repo = git_package.Repo(path, search_parent_directories=True)
|
47
|
+
self.repo = git.Repo(path, search_parent_directories=True)
|
47
48
|
self.git_version = self.repo.git.version_info
|
48
49
|
|
49
50
|
if self.git_version >= MIN_GIT_VERSION:
|
@@ -69,8 +70,8 @@ class GitRepo:
|
|
69
70
|
)
|
70
71
|
|
71
72
|
@property
|
72
|
-
def tracking_branch(self):
|
73
|
-
if not self.is_valid():
|
73
|
+
def tracking_branch(self) -> RemoteReference | None:
|
74
|
+
if self.repo is None or not self.is_valid():
|
74
75
|
return None
|
75
76
|
|
76
77
|
if self.is_head_detached:
|
@@ -79,41 +80,45 @@ class GitRepo:
|
|
79
80
|
return self.repo.active_branch.tracking_branch()
|
80
81
|
|
81
82
|
@property
|
82
|
-
def untracked_files(self):
|
83
|
-
if not self.is_valid():
|
83
|
+
def untracked_files(self) -> list[str] | None:
|
84
|
+
if self.repo is None or not self.is_valid():
|
84
85
|
return None
|
85
86
|
|
86
87
|
return self.repo.untracked_files
|
87
88
|
|
88
89
|
@property
|
89
|
-
def is_head_detached(self):
|
90
|
-
if not self.is_valid():
|
90
|
+
def is_head_detached(self) -> bool:
|
91
|
+
if self.repo is None or not self.is_valid():
|
91
92
|
return False
|
92
93
|
|
93
94
|
return self.repo.head.is_detached
|
94
95
|
|
95
96
|
@property
|
96
|
-
def uncommitted_files(self):
|
97
|
-
if not self.is_valid():
|
97
|
+
def uncommitted_files(self) -> list[str] | None:
|
98
|
+
if self.repo is None or not self.is_valid():
|
98
99
|
return None
|
99
100
|
|
100
|
-
return [item.a_path for item in self.repo.index.diff(None)]
|
101
|
+
return [cast("str", item.a_path) for item in self.repo.index.diff(None)]
|
101
102
|
|
102
103
|
@property
|
103
|
-
def ahead_commits(self):
|
104
|
-
if not self.is_valid():
|
104
|
+
def ahead_commits(self) -> list[Commit] | None:
|
105
|
+
if self.repo is None or not self.is_valid():
|
105
106
|
return None
|
106
107
|
|
107
108
|
try:
|
108
|
-
|
109
|
+
tracking_branch_info = self.get_tracking_branch_remote()
|
110
|
+
if tracking_branch_info is None:
|
111
|
+
return None
|
112
|
+
|
113
|
+
remote, branch_name = tracking_branch_info
|
109
114
|
remote_branch = f"{remote.name}/{branch_name}"
|
110
115
|
|
111
116
|
return list(self.repo.iter_commits(f"{remote_branch}..{branch_name}"))
|
112
117
|
except Exception:
|
113
118
|
return []
|
114
119
|
|
115
|
-
def get_tracking_branch_remote(self):
|
116
|
-
if not self.is_valid():
|
120
|
+
def get_tracking_branch_remote(self) -> tuple[Remote, str] | None:
|
121
|
+
if self.repo is None or not self.is_valid():
|
117
122
|
return None
|
118
123
|
|
119
124
|
tracking_branch = self.tracking_branch
|
@@ -21,7 +21,7 @@ import streamlit as st
|
|
21
21
|
from streamlit.hello.utils import show_code
|
22
22
|
|
23
23
|
|
24
|
-
def data_frame_demo():
|
24
|
+
def data_frame_demo() -> None:
|
25
25
|
@st.cache_data
|
26
26
|
def get_un_data() -> pd.DataFrame:
|
27
27
|
AWS_BUCKET_URL = "https://streamlit-demo-data.s3-us-west-2.amazonaws.com"
|
streamlit/hello/mapping_demo.py
CHANGED
streamlit/hello/plotting_demo.py
CHANGED
@@ -20,14 +20,14 @@ import streamlit as st
|
|
20
20
|
from streamlit.hello.utils import show_code
|
21
21
|
|
22
22
|
|
23
|
-
def plotting_demo():
|
23
|
+
def plotting_demo() -> None:
|
24
24
|
progress_bar = st.sidebar.progress(0)
|
25
25
|
status_text = st.sidebar.empty()
|
26
|
-
last_rows = np.random.randn(1, 1)
|
26
|
+
last_rows = np.random.randn(1, 1) # noqa: NPY002
|
27
27
|
chart = st.line_chart(last_rows)
|
28
28
|
|
29
29
|
for i in range(1, 101):
|
30
|
-
new_rows = last_rows[-1, :] + np.random.randn(5, 1).cumsum(axis=0)
|
30
|
+
new_rows = last_rows[-1, :] + np.random.randn(5, 1).cumsum(axis=0) # noqa: NPY002
|
31
31
|
status_text.text(f"{i}% complete")
|
32
32
|
chart.add_rows(new_rows)
|
33
33
|
progress_bar.progress(i)
|
streamlit/hello/streamlit_app.py
CHANGED
streamlit/hello/utils.py
CHANGED
@@ -14,11 +14,12 @@
|
|
14
14
|
|
15
15
|
import inspect
|
16
16
|
import textwrap
|
17
|
+
from typing import Any, Callable
|
17
18
|
|
18
19
|
import streamlit as st
|
19
20
|
|
20
21
|
|
21
|
-
def show_code(demo):
|
22
|
+
def show_code(demo: Callable[..., Any]) -> None:
|
22
23
|
"""Showing the code of the demo."""
|
23
24
|
show_code = st.sidebar.checkbox("Show code", True)
|
24
25
|
if show_code:
|
streamlit/logger.py
CHANGED
@@ -113,13 +113,12 @@ def get_logger(name: str) -> logging.Logger:
|
|
113
113
|
Logger
|
114
114
|
|
115
115
|
"""
|
116
|
-
if name in _loggers
|
116
|
+
if name in _loggers:
|
117
117
|
return _loggers[name]
|
118
118
|
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
logger = logging.getLogger(name)
|
119
|
+
logger = (
|
120
|
+
logging.getLogger("streamlit") if name == "root" else logging.getLogger(name)
|
121
|
+
)
|
123
122
|
|
124
123
|
logger.setLevel(_global_log_level)
|
125
124
|
logger.propagate = False
|
streamlit/proto/Audio_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Audio.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Audio.proto\x1a!streamlit/proto/WidthConfig.proto\"\xca\x01\n\x05\x41udio\x12\x0b\n\x03url\x18\x05 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x05\x12\x10\n\x08\x65nd_time\x18\x06 \x01(\x05\x12\x0c\n\x04loop\x18\x07 \x01(\x08\x12\x10\n\x08\x61utoplay\x18\x08 \x01(\x08\x12\n\n\x02id\x18\t \x01(\t\x12\x31\n\x0cwidth_config\x18\n \x01(\x0b\x32\x16.streamlit.WidthConfigH\x00\x88\x01\x01\x42\x0f\n\r_width_configJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05R\x04\x64\x61taR\x06\x66ormatB*\n\x1c\x63om.snowflake.apps.streamlitB\nAudioProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,6 +23,6 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Audio_pb2',
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\nAudioProto'
|
25
|
-
_globals['_AUDIO']._serialized_start=
|
26
|
-
_globals['_AUDIO']._serialized_end=
|
26
|
+
_globals['_AUDIO']._serialized_start=67
|
27
|
+
_globals['_AUDIO']._serialized_end=269
|
27
28
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Audio_pb2.pyi
CHANGED
@@ -20,6 +20,7 @@ limitations under the License.
|
|
20
20
|
import builtins
|
21
21
|
import google.protobuf.descriptor
|
22
22
|
import google.protobuf.message
|
23
|
+
import streamlit.proto.WidthConfig_pb2
|
23
24
|
import typing
|
24
25
|
|
25
26
|
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor
|
@@ -34,6 +35,7 @@ class Audio(google.protobuf.message.Message):
|
|
34
35
|
LOOP_FIELD_NUMBER: builtins.int
|
35
36
|
AUTOPLAY_FIELD_NUMBER: builtins.int
|
36
37
|
ID_FIELD_NUMBER: builtins.int
|
38
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
37
39
|
url: builtins.str
|
38
40
|
start_time: builtins.int
|
39
41
|
"""The currentTime attribute of the HTML <audio> tag's <source> subtag."""
|
@@ -43,6 +45,8 @@ class Audio(google.protobuf.message.Message):
|
|
43
45
|
"""Indicates whether the audio should start over from the beginning once it ends."""
|
44
46
|
autoplay: builtins.bool
|
45
47
|
id: builtins.str
|
48
|
+
@property
|
49
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
46
50
|
def __init__(
|
47
51
|
self,
|
48
52
|
*,
|
@@ -52,7 +56,10 @@ class Audio(google.protobuf.message.Message):
|
|
52
56
|
loop: builtins.bool = ...,
|
53
57
|
autoplay: builtins.bool = ...,
|
54
58
|
id: builtins.str = ...,
|
59
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
55
60
|
) -> None: ...
|
56
|
-
def
|
61
|
+
def HasField(self, field_name: typing.Literal["_width_config", b"_width_config", "width_config", b"width_config"]) -> builtins.bool: ...
|
62
|
+
def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "autoplay", b"autoplay", "end_time", b"end_time", "id", b"id", "loop", b"loop", "start_time", b"start_time", "url", b"url", "width_config", b"width_config"]) -> None: ...
|
63
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
57
64
|
|
58
65
|
global___Audio = Audio
|
streamlit/proto/Block_pb2.py
CHANGED
@@ -17,7 +17,7 @@ from streamlit.proto import HeightConfig_pb2 as streamlit_dot_proto_dot_HeightCo
|
|
17
17
|
from streamlit.proto import GapSize_pb2 as streamlit_dot_proto_dot_GapSize__pb2
|
18
18
|
|
19
19
|
|
20
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\x1a!streamlit/proto/WidthConfig.proto\x1a\"streamlit/proto/HeightConfig.proto\x1a\x1dstreamlit/proto/GapSize.proto\"\
|
20
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Block.proto\x1a!streamlit/proto/WidthConfig.proto\x1a\"streamlit/proto/HeightConfig.proto\x1a\x1dstreamlit/proto/GapSize.proto\"\xfa\r\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\x1f\n\x06\x64ialog\x18\x0b \x01(\x0b\x32\r.Block.DialogH\x00\x12.\n\x0e\x66lex_container\x18\r \x01(\x0b\x32\x14.Block.FlexContainerH\x00\x12\x13\n\x0b\x61llow_empty\x18\x08 \x01(\x08\x12\x0f\n\x02id\x18\x0c \x01(\tH\x01\x88\x01\x01\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\xbb\x02\n\rFlexContainer\x12\x0e\n\x06\x62order\x18\x01 \x01(\x08\x12.\n\rheight_config\x18\x02 \x01(\x0b\x32\x17.streamlit.HeightConfig\x12,\n\x0cwidth_config\x18\x03 \x01(\x0b\x32\x16.streamlit.WidthConfig\x12(\n\ngap_config\x18\x04 \x01(\x0b\x32\x14.streamlit.GapConfig\x12\r\n\x05scale\x18\x05 \x01(\x02\x12\x31\n\tdirection\x18\x06 \x01(\x0e\x32\x1e.Block.FlexContainer.Direction\x12\x0c\n\x04wrap\x18\x07 \x01(\x08\"B\n\tDirection\x12\x17\n\x13\x44IRECTION_UNDEFINED\x10\x00\x12\x0c\n\x08VERTICAL\x10\x01\x12\x0e\n\nHORIZONTAL\x10\x02\x1a\xef\x01\n\x06\x43olumn\x12\x0e\n\x06weight\x18\x01 \x01(\x01\x12\x0f\n\x03gap\x18\x02 \x01(\tB\x02\x18\x01\x12;\n\x12vertical_alignment\x18\x03 \x01(\x0e\x32\x1f.Block.Column.VerticalAlignment\x12\x13\n\x0bshow_border\x18\x04 \x01(\x08\x12-\n\ngap_config\x18\x05 \x01(\x0b\x32\x14.streamlit.GapConfigH\x00\x88\x01\x01\"4\n\x11VerticalAlignment\x12\x07\n\x03TOP\x10\x00\x12\n\n\x06\x43\x45NTER\x10\x01\x12\n\n\x06\x42OTTOM\x10\x02\x42\r\n\x0b_gap_config\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\x9d\x01\n\x06\x44ialog\x12\r\n\x05title\x18\x01 \x01(\t\x12\x13\n\x0b\x64ismissible\x18\x02 \x01(\x08\x12(\n\x05width\x18\x03 \x01(\x0e\x32\x19.Block.Dialog.DialogWidth\x12\x14\n\x07is_open\x18\x04 \x01(\x08H\x00\x88\x01\x01\"#\n\x0b\x44ialogWidth\x12\t\n\x05SMALL\x10\x00\x12\t\n\x05LARGE\x10\x01\x42\n\n\x08_is_open\x1aY\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\x12\x17\n\x0f\x65nter_to_submit\x18\x04 \x01(\x08\x1a\x0e\n\x0cTabContainer\x1a\x14\n\x03Tab\x12\r\n\x05label\x18\x01 \x01(\t\x1a\x63\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\x12\x0c\n\x04icon\x18\x05 \x01(\t\x1a\xd1\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\x12\x31\n\x0cwidth_config\x18\x04 \x01(\x0b\x32\x16.streamlit.WidthConfigH\x00\x88\x01\x01\",\n\nAvatarType\x12\t\n\x05IMAGE\x10\x00\x12\t\n\x05\x45MOJI\x10\x01\x12\x08\n\x04ICON\x10\x02\x42\x0f\n\r_width_configB\x06\n\x04typeB\x05\n\x03_idB*\n\x1c\x63om.snowflake.apps.streamlitB\nBlockProtob\x06proto3')
|
21
21
|
|
22
22
|
_globals = globals()
|
23
23
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -28,7 +28,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
28
28
|
_globals['_BLOCK_COLUMN'].fields_by_name['gap']._loaded_options = None
|
29
29
|
_globals['_BLOCK_COLUMN'].fields_by_name['gap']._serialized_options = b'\030\001'
|
30
30
|
_globals['_BLOCK']._serialized_start=134
|
31
|
-
_globals['_BLOCK']._serialized_end=
|
31
|
+
_globals['_BLOCK']._serialized_end=1920
|
32
32
|
_globals['_BLOCK_VERTICAL']._serialized_start=595
|
33
33
|
_globals['_BLOCK_VERTICAL']._serialized_end=637
|
34
34
|
_globals['_BLOCK_HORIZONTAL']._serialized_start=639
|
@@ -56,7 +56,7 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
56
56
|
_globals['_BLOCK_POPOVER']._serialized_start=1594
|
57
57
|
_globals['_BLOCK_POPOVER']._serialized_end=1693
|
58
58
|
_globals['_BLOCK_CHATMESSAGE']._serialized_start=1696
|
59
|
-
_globals['_BLOCK_CHATMESSAGE']._serialized_end=
|
60
|
-
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_start=
|
61
|
-
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_end=
|
59
|
+
_globals['_BLOCK_CHATMESSAGE']._serialized_end=1905
|
60
|
+
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_start=1844
|
61
|
+
_globals['_BLOCK_CHATMESSAGE_AVATARTYPE']._serialized_end=1888
|
62
62
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Block_pb2.pyi
CHANGED
@@ -310,17 +310,23 @@ class Block(google.protobuf.message.Message):
|
|
310
310
|
NAME_FIELD_NUMBER: builtins.int
|
311
311
|
AVATAR_FIELD_NUMBER: builtins.int
|
312
312
|
AVATAR_TYPE_FIELD_NUMBER: builtins.int
|
313
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
313
314
|
name: builtins.str
|
314
315
|
avatar: builtins.str
|
315
316
|
avatar_type: global___Block.ChatMessage.AvatarType.ValueType
|
317
|
+
@property
|
318
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
316
319
|
def __init__(
|
317
320
|
self,
|
318
321
|
*,
|
319
322
|
name: builtins.str = ...,
|
320
323
|
avatar: builtins.str = ...,
|
321
324
|
avatar_type: global___Block.ChatMessage.AvatarType.ValueType = ...,
|
325
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
322
326
|
) -> None: ...
|
323
|
-
def
|
327
|
+
def HasField(self, field_name: typing.Literal["_width_config", b"_width_config", "width_config", b"width_config"]) -> builtins.bool: ...
|
328
|
+
def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "avatar", b"avatar", "avatar_type", b"avatar_type", "name", b"name", "width_config", b"width_config"]) -> None: ...
|
329
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
324
330
|
|
325
331
|
VERTICAL_FIELD_NUMBER: builtins.int
|
326
332
|
HORIZONTAL_FIELD_NUMBER: builtins.int
|
streamlit/proto/ChatInput_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/ChatInput.proto\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1fstreamlit/proto/ChatInput.proto\x1a!streamlit/proto/WidthConfig.proto\"\x94\x03\n\tChatInput\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bplaceholder\x18\x02 \x01(\t\x12\x11\n\tmax_chars\x18\x03 \x01(\r\x12\x10\n\x08\x64isabled\x18\x04 \x01(\x08\x12\r\n\x05value\x18\x05 \x01(\t\x12\x11\n\tset_value\x18\x06 \x01(\x08\x12\x0f\n\x07\x64\x65\x66\x61ult\x18\x07 \x01(\t\x12%\n\x08position\x18\x08 \x01(\x0e\x32\x13.ChatInput.Position\x12*\n\x0b\x61\x63\x63\x65pt_file\x18\t \x01(\x0e\x32\x15.ChatInput.AcceptFile\x12\x11\n\tfile_type\x18\n \x03(\t\x12\x1a\n\x12max_upload_size_mb\x18\x0b \x01(\x05\x12\x31\n\x0cwidth_config\x18\x0c \x01(\x0b\x32\x16.streamlit.WidthConfigH\x00\x88\x01\x01\"\x16\n\x08Position\x12\n\n\x06\x42OTTOM\x10\x00\"0\n\nAcceptFile\x12\x08\n\x04NONE\x10\x00\x12\n\n\x06SINGLE\x10\x01\x12\x0c\n\x08MULTIPLE\x10\x02\x42\x0f\n\r_width_configB.\n\x1c\x63om.snowflake.apps.streamlitB\x0e\x43hatInputProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,10 +23,10 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.ChatInput_p
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\016ChatInputProto'
|
25
|
-
_globals['_CHATINPUT']._serialized_start=
|
26
|
-
_globals['_CHATINPUT']._serialized_end=
|
27
|
-
_globals['_CHATINPUT_POSITION']._serialized_start=
|
28
|
-
_globals['_CHATINPUT_POSITION']._serialized_end=
|
29
|
-
_globals['_CHATINPUT_ACCEPTFILE']._serialized_start=
|
30
|
-
_globals['_CHATINPUT_ACCEPTFILE']._serialized_end=
|
26
|
+
_globals['_CHATINPUT']._serialized_start=71
|
27
|
+
_globals['_CHATINPUT']._serialized_end=475
|
28
|
+
_globals['_CHATINPUT_POSITION']._serialized_start=386
|
29
|
+
_globals['_CHATINPUT_POSITION']._serialized_end=408
|
30
|
+
_globals['_CHATINPUT_ACCEPTFILE']._serialized_start=410
|
31
|
+
_globals['_CHATINPUT_ACCEPTFILE']._serialized_end=458
|
31
32
|
# @@protoc_insertion_point(module_scope)
|
@@ -23,6 +23,7 @@ import google.protobuf.descriptor
|
|
23
23
|
import google.protobuf.internal.containers
|
24
24
|
import google.protobuf.internal.enum_type_wrapper
|
25
25
|
import google.protobuf.message
|
26
|
+
import streamlit.proto.WidthConfig_pb2
|
26
27
|
import sys
|
27
28
|
import typing
|
28
29
|
|
@@ -76,6 +77,7 @@ class ChatInput(google.protobuf.message.Message):
|
|
76
77
|
ACCEPT_FILE_FIELD_NUMBER: builtins.int
|
77
78
|
FILE_TYPE_FIELD_NUMBER: builtins.int
|
78
79
|
MAX_UPLOAD_SIZE_MB_FIELD_NUMBER: builtins.int
|
80
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
79
81
|
id: builtins.str
|
80
82
|
placeholder: builtins.str
|
81
83
|
max_chars: builtins.int
|
@@ -91,6 +93,10 @@ class ChatInput(google.protobuf.message.Message):
|
|
91
93
|
def file_type(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]:
|
92
94
|
"""Supported file types: For example: ["png","jpg","img"]"""
|
93
95
|
|
96
|
+
@property
|
97
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig:
|
98
|
+
"""Optional width configuration for the ChatInput"""
|
99
|
+
|
94
100
|
def __init__(
|
95
101
|
self,
|
96
102
|
*,
|
@@ -105,7 +111,10 @@ class ChatInput(google.protobuf.message.Message):
|
|
105
111
|
accept_file: global___ChatInput.AcceptFile.ValueType = ...,
|
106
112
|
file_type: collections.abc.Iterable[builtins.str] | None = ...,
|
107
113
|
max_upload_size_mb: builtins.int = ...,
|
114
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
108
115
|
) -> None: ...
|
109
|
-
def
|
116
|
+
def HasField(self, field_name: typing.Literal["_width_config", b"_width_config", "width_config", b"width_config"]) -> builtins.bool: ...
|
117
|
+
def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "accept_file", b"accept_file", "default", b"default", "disabled", b"disabled", "file_type", b"file_type", "id", b"id", "max_chars", b"max_chars", "max_upload_size_mb", b"max_upload_size_mb", "placeholder", b"placeholder", "position", b"position", "set_value", b"set_value", "value", b"value", "width_config", b"width_config"]) -> None: ...
|
118
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
110
119
|
|
111
120
|
global___ChatInput = ChatInput
|
streamlit/proto/Video_pb2.py
CHANGED
@@ -12,9 +12,10 @@ from google.protobuf.internal import builder as _builder
|
|
12
12
|
_sym_db = _symbol_database.Default()
|
13
13
|
|
14
14
|
|
15
|
+
from streamlit.proto import WidthConfig_pb2 as streamlit_dot_proto_dot_WidthConfig__pb2
|
15
16
|
|
16
17
|
|
17
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Video.proto\"+\n\rSubtitleTrack\x12\r\n\x05label\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\
|
18
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1bstreamlit/proto/Video.proto\x1a!streamlit/proto/WidthConfig.proto\"+\n\rSubtitleTrack\x12\r\n\x05label\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\"\xcb\x02\n\x05Video\x12\x0b\n\x03url\x18\x06 \x01(\t\x12\x12\n\nstart_time\x18\x03 \x01(\x05\x12\x19\n\x04type\x18\x05 \x01(\x0e\x32\x0b.Video.Type\x12!\n\tsubtitles\x18\x07 \x03(\x0b\x32\x0e.SubtitleTrack\x12\x10\n\x08\x65nd_time\x18\x08 \x01(\x05\x12\x0c\n\x04loop\x18\t \x01(\x08\x12\x10\n\x08\x61utoplay\x18\n \x01(\x08\x12\r\n\x05muted\x18\x0b \x01(\x08\x12\n\n\x02id\x18\x0c \x01(\t\x12\x31\n\x0cwidth_config\x18\r \x01(\x0b\x32\x16.streamlit.WidthConfigH\x00\x88\x01\x01\"2\n\x04Type\x12\n\n\x06UNUSED\x10\x00\x12\n\n\x06NATIVE\x10\x01\x12\x12\n\x0eYOUTUBE_IFRAME\x10\x02\x42\x0f\n\r_width_configJ\x04\x08\x01\x10\x02J\x04\x08\x02\x10\x03J\x04\x08\x04\x10\x05R\x06\x66ormatR\x04\x64\x61taB*\n\x1c\x63om.snowflake.apps.streamlitB\nVideoProtob\x06proto3')
|
18
19
|
|
19
20
|
_globals = globals()
|
20
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
@@ -22,10 +23,10 @@ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'streamlit.proto.Video_pb2',
|
|
22
23
|
if not _descriptor._USE_C_DESCRIPTORS:
|
23
24
|
_globals['DESCRIPTOR']._loaded_options = None
|
24
25
|
_globals['DESCRIPTOR']._serialized_options = b'\n\034com.snowflake.apps.streamlitB\nVideoProto'
|
25
|
-
_globals['_SUBTITLETRACK']._serialized_start=
|
26
|
-
_globals['_SUBTITLETRACK']._serialized_end=
|
27
|
-
_globals['_VIDEO']._serialized_start=
|
28
|
-
_globals['_VIDEO']._serialized_end=
|
29
|
-
_globals['_VIDEO_TYPE']._serialized_start=
|
30
|
-
_globals['_VIDEO_TYPE']._serialized_end=
|
26
|
+
_globals['_SUBTITLETRACK']._serialized_start=66
|
27
|
+
_globals['_SUBTITLETRACK']._serialized_end=109
|
28
|
+
_globals['_VIDEO']._serialized_start=112
|
29
|
+
_globals['_VIDEO']._serialized_end=443
|
30
|
+
_globals['_VIDEO_TYPE']._serialized_start=344
|
31
|
+
_globals['_VIDEO_TYPE']._serialized_end=394
|
31
32
|
# @@protoc_insertion_point(module_scope)
|
streamlit/proto/Video_pb2.pyi
CHANGED
@@ -23,6 +23,7 @@ import google.protobuf.descriptor
|
|
23
23
|
import google.protobuf.internal.containers
|
24
24
|
import google.protobuf.internal.enum_type_wrapper
|
25
25
|
import google.protobuf.message
|
26
|
+
import streamlit.proto.WidthConfig_pb2
|
26
27
|
import sys
|
27
28
|
import typing
|
28
29
|
|
@@ -82,6 +83,7 @@ class Video(google.protobuf.message.Message):
|
|
82
83
|
AUTOPLAY_FIELD_NUMBER: builtins.int
|
83
84
|
MUTED_FIELD_NUMBER: builtins.int
|
84
85
|
ID_FIELD_NUMBER: builtins.int
|
86
|
+
WIDTH_CONFIG_FIELD_NUMBER: builtins.int
|
85
87
|
url: builtins.str
|
86
88
|
"""A url pointing to a video file"""
|
87
89
|
start_time: builtins.int
|
@@ -99,6 +101,8 @@ class Video(google.protobuf.message.Message):
|
|
99
101
|
def subtitles(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SubtitleTrack]:
|
100
102
|
"""Repeated field for subtitle tracks"""
|
101
103
|
|
104
|
+
@property
|
105
|
+
def width_config(self) -> streamlit.proto.WidthConfig_pb2.WidthConfig: ...
|
102
106
|
def __init__(
|
103
107
|
self,
|
104
108
|
*,
|
@@ -111,7 +115,10 @@ class Video(google.protobuf.message.Message):
|
|
111
115
|
autoplay: builtins.bool = ...,
|
112
116
|
muted: builtins.bool = ...,
|
113
117
|
id: builtins.str = ...,
|
118
|
+
width_config: streamlit.proto.WidthConfig_pb2.WidthConfig | None = ...,
|
114
119
|
) -> None: ...
|
115
|
-
def
|
120
|
+
def HasField(self, field_name: typing.Literal["_width_config", b"_width_config", "width_config", b"width_config"]) -> builtins.bool: ...
|
121
|
+
def ClearField(self, field_name: typing.Literal["_width_config", b"_width_config", "autoplay", b"autoplay", "end_time", b"end_time", "id", b"id", "loop", b"loop", "muted", b"muted", "start_time", b"start_time", "subtitles", b"subtitles", "type", b"type", "url", b"url", "width_config", b"width_config"]) -> None: ...
|
122
|
+
def WhichOneof(self, oneof_group: typing.Literal["_width_config", b"_width_config"]) -> typing.Literal["width_config"] | None: ...
|
116
123
|
|
117
124
|
global___Video = Video
|