streamlit-nightly 1.45.2.dev20250512__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.
Files changed (131) hide show
  1. streamlit/__init__.py +1 -0
  2. streamlit/auth_util.py +6 -6
  3. streamlit/commands/echo.py +5 -3
  4. streamlit/components/v1/custom_component.py +2 -2
  5. streamlit/config.py +7 -7
  6. streamlit/config_util.py +5 -6
  7. streamlit/delta_generator.py +4 -1
  8. streamlit/deprecation_util.py +5 -5
  9. streamlit/elements/doc_string.py +4 -6
  10. streamlit/elements/lib/built_in_chart_utils.py +13 -8
  11. streamlit/elements/lib/policies.py +1 -1
  12. streamlit/elements/spinner.py +1 -1
  13. streamlit/elements/vega_charts.py +1 -1
  14. streamlit/elements/widgets/slider.py +1 -1
  15. streamlit/elements/write.py +2 -2
  16. streamlit/error_util.py +15 -8
  17. streamlit/errors.py +10 -7
  18. streamlit/file_util.py +6 -3
  19. streamlit/git_util.py +26 -21
  20. streamlit/hello/dataframe_demo.py +1 -1
  21. streamlit/hello/mapping_demo.py +1 -1
  22. streamlit/hello/plotting_demo.py +3 -3
  23. streamlit/hello/streamlit_app.py +1 -1
  24. streamlit/hello/utils.py +2 -1
  25. streamlit/runtime/app_session.py +4 -4
  26. streamlit/runtime/caching/cache_data_api.py +2 -2
  27. streamlit/runtime/caching/cache_resource_api.py +1 -1
  28. streamlit/runtime/caching/cache_utils.py +3 -3
  29. streamlit/runtime/caching/hashing.py +2 -2
  30. streamlit/runtime/credentials.py +4 -4
  31. streamlit/runtime/forward_msg_queue.py +1 -1
  32. streamlit/runtime/memory_uploaded_file_manager.py +1 -1
  33. streamlit/runtime/metrics_util.py +1 -1
  34. streamlit/runtime/runtime.py +1 -1
  35. streamlit/runtime/scriptrunner/exec_code.py +1 -1
  36. streamlit/runtime/scriptrunner/script_cache.py +1 -1
  37. streamlit/runtime/scriptrunner/script_runner.py +9 -2
  38. streamlit/runtime/scriptrunner_utils/script_requests.py +3 -3
  39. streamlit/runtime/scriptrunner_utils/script_run_context.py +3 -3
  40. streamlit/runtime/secrets.py +6 -7
  41. streamlit/runtime/state/query_params.py +1 -1
  42. streamlit/runtime/stats.py +1 -1
  43. streamlit/static/index.html +1 -1
  44. streamlit/static/static/js/{ErrorOutline.esm.Cfhrjz42.js → ErrorOutline.esm.CxkgXqSh.js} +1 -1
  45. streamlit/static/static/js/{FileDownload.esm.BN5DkI-d.js → FileDownload.esm.DVrjmwoh.js} +1 -1
  46. streamlit/static/static/js/{FileHelper.BWWhRdUs.js → FileHelper.CMA9s0t3.js} +1 -1
  47. streamlit/static/static/js/{FormClearHelper.CHPGUkGG.js → FormClearHelper.Ca3GFjxv.js} +1 -1
  48. streamlit/static/static/js/{Hooks.DjxyUmgD.js → Hooks.BpCPXt5n.js} +1 -1
  49. streamlit/static/static/js/{InputInstructions.Bkai2tFZ.js → InputInstructions.BO_BnHv5.js} +1 -1
  50. streamlit/static/static/js/{ProgressBar.DFiqS51i.js → ProgressBar.Ctk1m4EX.js} +1 -1
  51. streamlit/static/static/js/{RenderInPortalIfExists.DWTzV71R.js → RenderInPortalIfExists.kuKoxpXt.js} +1 -1
  52. streamlit/static/static/js/{Toolbar.Dk2A3VxL.js → Toolbar.Cde1fEcQ.js} +1 -1
  53. streamlit/static/static/js/{base-input.DfiT3r4p.js → base-input.BwCmIYba.js} +1 -1
  54. streamlit/static/static/js/{checkbox.DLXFjls2.js → checkbox.CwPOyuag.js} +1 -1
  55. streamlit/static/static/js/{createSuper.n2DV0o-4.js → createSuper.BMtevhyt.js} +1 -1
  56. streamlit/static/static/js/{data-grid-overlay-editor.v1LF25Ml.js → data-grid-overlay-editor.gtfE9z1L.js} +1 -1
  57. streamlit/static/static/js/{downloader.CI8EFE9Y.js → downloader.-58ZXBvx.js} +1 -1
  58. streamlit/static/static/js/{es6.CH6Tf3Uw.js → es6.6JpsZqpF.js} +2 -2
  59. streamlit/static/static/js/{iframeResizer.contentWindow.VCjyiSg6.js → iframeResizer.contentWindow.Dvm_jxul.js} +1 -1
  60. streamlit/static/static/js/{index.BEE4v1Vc.js → index.9Bu4pGgs.js} +1 -1
  61. streamlit/static/static/js/{index.DM_jnlWC.js → index.B1T1N6vQ.js} +1 -1
  62. streamlit/static/static/js/{index.CmsMgepL.js → index.B9LBeTzL.js} +1 -1
  63. streamlit/static/static/js/{index.hFB9saa3.js → index.BXdNB_A0.js} +1 -1
  64. streamlit/static/static/js/{index.STF1QdPr.js → index.Bd91GXu8.js} +1 -1
  65. streamlit/static/static/js/{index.LqvX_Kr6.js → index.BdEKCy-o.js} +1 -1
  66. streamlit/static/static/js/{index.C1P3O0oI.js → index.BhODUTaJ.js} +1 -1
  67. streamlit/static/static/js/{index.nmbrjghZ.js → index.BjtSRm-c.js} +1 -1
  68. streamlit/static/static/js/{index.C9ORVZvA.js → index.BnK8pWHN.js} +1 -1
  69. streamlit/static/static/js/{index.BWVpiUBA.js → index.C5xsotRs.js} +1 -1
  70. streamlit/static/static/js/{index.DUU38l7N.js → index.CD3lJu6g.js} +1 -1
  71. streamlit/static/static/js/{index.B-Q1qQil.js → index.CGJjlswG.js} +1 -1
  72. streamlit/static/static/js/{index.uN3TP5oq.js → index.CIZd1q4K.js} +1 -1
  73. streamlit/static/static/js/{index.DoM9A12Z.js → index.CZy9JHE4.js} +2 -2
  74. streamlit/static/static/js/{index.9p279joF.js → index.Ce-7kIl6.js} +1 -1
  75. streamlit/static/static/js/{index.D_Bv6KD1.js → index.CiiU1-bS.js} +1 -1
  76. streamlit/static/static/js/{index.D1An7GDs.js → index.ClE8XHxl.js} +1 -1
  77. streamlit/static/static/js/{index.SPkHHODG.js → index.CvKH37SN.js} +1 -1
  78. streamlit/static/static/js/{index.BFEA8ufN.js → index.D0G-y_z6.js} +1 -1
  79. streamlit/static/static/js/{index.uhNJX5pn.js → index.D1ccH_2Z.js} +1 -1
  80. streamlit/static/static/js/{index.DKsDSPTo.js → index.D3ES4sSL.js} +1 -1
  81. streamlit/static/static/js/{index.BROoC18J.js → index.DJ0X7aeY.js} +1 -1
  82. streamlit/static/static/js/{index.BgY_Js0s.js → index.DNNQBTM6.js} +1 -1
  83. streamlit/static/static/js/{index.Ovig-AMR.js → index.DQJE0i9s.js} +5 -5
  84. streamlit/static/static/js/{index.ZuW7Olhm.js → index.DR9ekgzX.js} +1 -1
  85. streamlit/static/static/js/{index.DXDmqevk.js → index.DUizq_aW.js} +1 -1
  86. streamlit/static/static/js/{index.D1DxKfIm.js → index.DVE5BhiT.js} +1 -1
  87. streamlit/static/static/js/{index.7XN_jSTW.js → index.DW60zbv4.js} +1 -1
  88. streamlit/static/static/js/{index.Cdsxte9t.js → index.DenamHJl.js} +1 -1
  89. streamlit/static/static/js/{index.DMDjQhhk.js → index.DgnhzFgr.js} +1 -1
  90. streamlit/static/static/js/{index.DgeyRl4J.js → index.Dk_aZplH.js} +1 -1
  91. streamlit/static/static/js/{index.C1TEsRV0.js → index.Dqcp7EZB.js} +43 -43
  92. streamlit/static/static/js/{index.CXpQxU0G.js → index.NfOJ2GJ6.js} +1 -1
  93. streamlit/static/static/js/{index.CR4eM0Q3.js → index.WVgPkrrw.js} +1 -1
  94. streamlit/static/static/js/{index.jZkr87Ly.js → index.bkU6rhIM.js} +1 -1
  95. streamlit/static/static/js/{index.DcH46Eo2.js → index.hQ5adhxG.js} +1 -1
  96. streamlit/static/static/js/{index.B1j5m20t.js → index.lYSTjxV_.js} +1 -1
  97. streamlit/static/static/js/{input.BAfiLByr.js → input.JEUWF6Z-.js} +1 -1
  98. streamlit/static/static/js/{memory.CvD1KGKJ.js → memory.BToPJrCN.js} +1 -1
  99. streamlit/static/static/js/{mergeWith.Dy4BuY-h.js → mergeWith.DGon2YId.js} +1 -1
  100. streamlit/static/static/js/{number-overlay-editor.Bl84FLfp.js → number-overlay-editor.kqkFTYSn.js} +1 -1
  101. streamlit/static/static/js/{possibleConstructorReturn.gffiKeDQ.js → possibleConstructorReturn.twGQoCQl.js} +1 -1
  102. streamlit/static/static/js/{sandbox.BXw8ya9t.js → sandbox.o85HOKwq.js} +1 -1
  103. streamlit/static/static/js/{textarea.DNNNKi6n.js → textarea.CdOYpTta.js} +1 -1
  104. streamlit/static/static/js/{timepicker.CgHlrhoy.js → timepicker.Cy1BKBo3.js} +1 -1
  105. streamlit/static/static/js/{toConsumableArray.MtZ-3vir.js → toConsumableArray.BVXfsvDc.js} +1 -1
  106. streamlit/static/static/js/{uniqueId.CFcd6g0d.js → uniqueId.Dz7-nY8K.js} +1 -1
  107. streamlit/static/static/js/{useBasicWidgetState.DadZUraL.js → useBasicWidgetState.CeKdNkz-.js} +1 -1
  108. streamlit/static/static/js/{useOnInputChange.V6d5TCFH.js → useOnInputChange.CM8BtP-c.js} +1 -1
  109. streamlit/static/static/js/{withFullScreenWrapper.8qpius26.js → withFullScreenWrapper.DuyW554J.js} +1 -1
  110. streamlit/temporary_directory.py +2 -2
  111. streamlit/testing/v1/app_test.py +2 -2
  112. streamlit/testing/v1/element_tree.py +5 -5
  113. streamlit/watcher/folder_black_list.py +1 -1
  114. streamlit/watcher/local_sources_watcher.py +5 -3
  115. streamlit/watcher/path_watcher.py +1 -1
  116. streamlit/watcher/polling_path_watcher.py +1 -1
  117. streamlit/watcher/util.py +6 -5
  118. streamlit/web/bootstrap.py +4 -4
  119. streamlit/web/cli.py +13 -13
  120. streamlit/web/server/app_static_file_handler.py +1 -1
  121. streamlit/web/server/authlib_tornado_integration.py +6 -1
  122. streamlit/web/server/oauth_authlib_routes.py +3 -3
  123. streamlit/web/server/oidc_mixin.py +15 -3
  124. streamlit/web/server/routes.py +11 -11
  125. streamlit/web/server/stats_request_handler.py +2 -2
  126. {streamlit_nightly-1.45.2.dev20250512.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/METADATA +1 -1
  127. {streamlit_nightly-1.45.2.dev20250512.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/RECORD +131 -131
  128. {streamlit_nightly-1.45.2.dev20250512.data → streamlit_nightly-1.45.2.dev20250513.data}/scripts/streamlit.cmd +0 -0
  129. {streamlit_nightly-1.45.2.dev20250512.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/WHEEL +0 -0
  130. {streamlit_nightly-1.45.2.dev20250512.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/entry_points.txt +0 -0
  131. {streamlit_nightly-1.45.2.dev20250512.dist-info → streamlit_nightly-1.45.2.dev20250513.dist-info}/top_level.txt +0 -0
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:
@@ -151,7 +151,7 @@ class AppSession:
151
151
  self._client_state = ClientState()
152
152
 
153
153
  self._local_sources_watcher: LocalSourcesWatcher | None = None
154
- self._stop_config_listener: Callable[[], bool] | None = None
154
+ self._stop_config_listener: Callable[[], None] | None = None
155
155
  self._stop_pages_listener: Callable[[], None] | None = None
156
156
 
157
157
  if config.get_option("server.fileWatcherType") != "none":
@@ -792,12 +792,12 @@ class AppSession:
792
792
  msg.git_info_changed.branch = branch
793
793
  msg.git_info_changed.module = module
794
794
 
795
- msg.git_info_changed.untracked_files[:] = repo.untracked_files
796
- msg.git_info_changed.uncommitted_files[:] = repo.uncommitted_files
795
+ msg.git_info_changed.untracked_files[:] = repo.untracked_files or []
796
+ msg.git_info_changed.uncommitted_files[:] = repo.uncommitted_files or []
797
797
 
798
798
  if repo.is_head_detached:
799
799
  msg.git_info_changed.state = GitInfo.GitStates.HEAD_DETACHED
800
- elif len(repo.ahead_commits) > 0:
800
+ elif repo.ahead_commits and len(repo.ahead_commits) > 0:
801
801
  msg.git_info_changed.state = GitInfo.GitStates.AHEAD_OF_REMOTE
802
802
  else:
803
803
  msg.git_info_changed.state = GitInfo.GitStates.DEFAULT
@@ -147,7 +147,7 @@ class CachedDataFuncInfo(CachedFuncInfo):
147
147
  class DataCaches(CacheStatsProvider):
148
148
  """Manages all DataCache instances."""
149
149
 
150
- def __init__(self):
150
+ def __init__(self) -> None:
151
151
  self._caches_lock = threading.Lock()
152
152
  self._function_caches: dict[str, DataCache] = {}
153
153
 
@@ -566,7 +566,7 @@ class CacheDataAPI:
566
566
  if experimental_allow_widgets:
567
567
  show_widget_replay_deprecation("cache_data")
568
568
 
569
- def wrapper(f):
569
+ def wrapper(f): # noqa: ANN001, ANN202
570
570
  return make_cached_func_wrapper(
571
571
  CachedDataFuncInfo(
572
572
  func=f,
@@ -69,7 +69,7 @@ def _equal_validate_funcs(a: ValidateFunc | None, b: ValidateFunc | None) -> boo
69
69
  class ResourceCaches(CacheStatsProvider):
70
70
  """Manages all ResourceCache instances."""
71
71
 
72
- def __init__(self):
72
+ def __init__(self) -> None:
73
73
  self._caches_lock = threading.Lock()
74
74
  self._function_caches: dict[str, ResourceCache] = {}
75
75
 
@@ -65,7 +65,7 @@ TTLCACHE_TIMER = time.monotonic
65
65
  class Cache:
66
66
  """Function cache interface. Caches persist across script runs."""
67
67
 
68
- def __init__(self):
68
+ def __init__(self) -> None:
69
69
  self._value_locks: dict[str, threading.Lock] = defaultdict(threading.Lock)
70
70
  self._value_locks_lock = threading.Lock()
71
71
 
@@ -196,7 +196,7 @@ class CachedFunc:
196
196
  def __repr__(self) -> str:
197
197
  return f"<CachedFunc: {self._info.func}>"
198
198
 
199
- def __get__(self, instance, owner=None):
199
+ def __get__(self, instance: Any, owner: Any | None = None) -> Any:
200
200
  """CachedFunc implements descriptor protocol to support cache methods."""
201
201
  if instance is None:
202
202
  return self
@@ -346,7 +346,7 @@ class CachedFunc:
346
346
  return_value=computed_value, func=self._info.func
347
347
  )
348
348
 
349
- def clear(self, *args, **kwargs):
349
+ def clear(self, *args: Any, **kwargs: Any) -> None:
350
350
  """Clear the cached function's associated cache.
351
351
 
352
352
  If no arguments are passed, Streamlit will clear all values cached for
@@ -182,7 +182,7 @@ class _HashStack:
182
182
  This causes the "in" to crash since it expects a boolean.
183
183
  """
184
184
 
185
- def __init__(self):
185
+ def __init__(self) -> None:
186
186
  self._stack: collections.OrderedDict[int, list[Any]] = collections.OrderedDict()
187
187
  # A function that we decorate with streamlit cache
188
188
  # primitive (st.cache_data or st.cache_resource).
@@ -213,7 +213,7 @@ class _HashStack:
213
213
  class _HashStacks:
214
214
  """Stacks of what has been hashed, with at most 1 stack per thread."""
215
215
 
216
- def __init__(self):
216
+ def __init__(self) -> None:
217
217
  self._stacks: weakref.WeakKeyDictionary[threading.Thread, _HashStack] = (
218
218
  weakref.WeakKeyDictionary()
219
219
  )
@@ -66,7 +66,7 @@ Collecting usage statistics. To deactivate, set browser.gatherUsageStats to fals
66
66
  """
67
67
 
68
68
 
69
- def _send_email(email: str) -> None:
69
+ def _send_email(email: str | None) -> None:
70
70
  """Send the user's email for metrics, if submitted."""
71
71
  import requests
72
72
 
@@ -124,15 +124,15 @@ class Credentials:
124
124
 
125
125
  return cast("Credentials", Credentials._singleton)
126
126
 
127
- def __init__(self):
127
+ def __init__(self) -> None:
128
128
  """Initialize class."""
129
129
  if Credentials._singleton is not None:
130
130
  raise RuntimeError(
131
131
  "Credentials already initialized. Use .get_current() instead"
132
132
  )
133
133
 
134
- self.activation = None
135
- self._conf_file = _get_credential_file_path()
134
+ self.activation: _Activation | None = None
135
+ self._conf_file: str = _get_credential_file_path()
136
136
 
137
137
  Credentials._singleton = self
138
138
 
@@ -41,7 +41,7 @@ class ForwardMsgQueue:
41
41
  """
42
42
  ForwardMsgQueue._before_enqueue_msg = before_enqueue_msg
43
43
 
44
- def __init__(self):
44
+ def __init__(self) -> None:
45
45
  self._queue: list[ForwardMsg] = []
46
46
  # A mapping of (delta_path -> _queue.indexof(msg)) for each
47
47
  # Delta message in the queue. We use this for coalescing
@@ -92,7 +92,7 @@ class MemoryUploadedFileManager(UploadedFileManager):
92
92
 
93
93
  self.file_storage[session_id][file.file_id] = file
94
94
 
95
- def remove_file(self, session_id, file_id):
95
+ def remove_file(self, session_id: str, file_id: str) -> None:
96
96
  """Remove file with given file_id associated with a given session."""
97
97
  session_storage = self.file_storage[session_id]
98
98
  session_storage.pop(file_id, None)
@@ -228,7 +228,7 @@ class Installation:
228
228
  cls._instance = Installation()
229
229
  return cls._instance
230
230
 
231
- def __init__(self):
231
+ def __init__(self) -> None:
232
232
  self.installation_id_v3 = str(
233
233
  uuid.uuid5(uuid.NAMESPACE_DNS, _get_machine_id_v3())
234
234
  )
@@ -313,7 +313,7 @@ class Runtime:
313
313
 
314
314
  async_objs = self._get_async_objs()
315
315
 
316
- def stop_on_eventloop():
316
+ def stop_on_eventloop() -> None:
317
317
  if self._state in (RuntimeState.STOPPING, RuntimeState.STOPPED):
318
318
  return
319
319
 
@@ -50,7 +50,7 @@ class modified_sys_path: # noqa: N801
50
50
  def __repr__(self) -> str:
51
51
  return util.repr_(self)
52
52
 
53
- def __enter__(self):
53
+ def __enter__(self) -> None:
54
54
  if self._main_script_path not in sys.path:
55
55
  sys.path.insert(0, self._main_script_path)
56
56
  self._added_path = True
@@ -26,7 +26,7 @@ from streamlit.source_util import open_python_file
26
26
  class ScriptCache:
27
27
  """Thread-safe cache of Python script bytecode."""
28
28
 
29
- def __init__(self):
29
+ def __init__(self) -> None:
30
30
  # Mapping of script_path: bytecode
31
31
  self._cache: dict[str, Any] = {}
32
32
  self._lock = threading.Lock()
@@ -62,6 +62,8 @@ from streamlit.runtime.state import (
62
62
  from streamlit.source_util import page_sort_key
63
63
 
64
64
  if TYPE_CHECKING:
65
+ from collections.abc import Generator
66
+
65
67
  from streamlit.runtime.fragment import FragmentStorage
66
68
  from streamlit.runtime.scriptrunner.script_cache import ScriptCache
67
69
  from streamlit.runtime.uploaded_file_manager import UploadedFileManager
@@ -437,7 +439,7 @@ class ScriptRunner:
437
439
  raise StopException()
438
440
 
439
441
  @contextmanager
440
- def _set_execing_flag(self):
442
+ def _set_execing_flag(self) -> Generator[None, None, None]:
441
443
  """A context for setting the ScriptRunner._execing flag.
442
444
 
443
445
  Used by _maybe_handle_execution_control_request to ensure that
@@ -585,7 +587,12 @@ class ScriptRunner:
585
587
  # assume is the main script directory.
586
588
  module.__dict__["__file__"] = script_path
587
589
 
588
- def code_to_exec(code=code, module=module, ctx=ctx, rerun_data=rerun_data):
590
+ def code_to_exec(
591
+ code: str = code,
592
+ module: types.ModuleType = module,
593
+ ctx: ScriptRunContext = ctx,
594
+ rerun_data: RerunData = rerun_data,
595
+ ) -> None:
589
596
  with (
590
597
  modified_sys_path(self._main_script_path),
591
598
  self._set_execing_flag(),
@@ -111,9 +111,9 @@ def _coalesce_widget_states(
111
111
  """
112
112
  if not old_states and not new_states:
113
113
  return None
114
- elif not old_states:
114
+ if not old_states:
115
115
  return new_states
116
- elif not new_states:
116
+ if not new_states:
117
117
  return old_states
118
118
 
119
119
  states_by_id: dict[str, WidgetState] = {
@@ -161,7 +161,7 @@ class ScriptRequests:
161
161
  ScriptRunner handles those requests.
162
162
  """
163
163
 
164
- def __init__(self):
164
+ def __init__(self) -> None:
165
165
  self._lock = threading.Lock()
166
166
  self._state = ScriptRequestType.CONTINUE
167
167
  self._rerun_data = RerunData()
@@ -204,7 +204,7 @@ class ScriptRunContext:
204
204
  # Pass the message up to our associated ScriptRunner.
205
205
  self._enqueue(msg_to_send)
206
206
 
207
- def ensure_single_query_api_used(self):
207
+ def ensure_single_query_api_used(self) -> None:
208
208
  if self._experimental_query_params_used and self._production_query_params_used:
209
209
  raise StreamlitAPIException(
210
210
  "Using `st.query_params` together with either `st.experimental_get_query_params` "
@@ -212,11 +212,11 @@ class ScriptRunContext:
212
212
  " convert your app to only use `st.query_params`"
213
213
  )
214
214
 
215
- def mark_experimental_query_params_used(self):
215
+ def mark_experimental_query_params_used(self) -> None:
216
216
  self._experimental_query_params_used = True
217
217
  self.ensure_single_query_api_used()
218
218
 
219
- def mark_production_query_params_used(self):
219
+ def mark_production_query_params_used(self) -> None:
220
220
  self._production_query_params_used = True
221
221
  self.ensure_single_query_api_used()
222
222
 
@@ -27,9 +27,8 @@ from typing import (
27
27
 
28
28
  from blinker import Signal
29
29
 
30
- import streamlit as st
31
30
  import streamlit.watcher.path_watcher
32
- from streamlit import runtime
31
+ from streamlit import config, runtime
33
32
  from streamlit.errors import StreamlitSecretNotFoundError
34
33
  from streamlit.logger import get_logger
35
34
 
@@ -45,7 +44,7 @@ class SecretErrorMessages:
45
44
  For internal use, may change in future releases without notice.
46
45
  """
47
46
 
48
- def __init__(self):
47
+ def __init__(self) -> None:
49
48
  self.missing_attr_message = lambda attr_name: (
50
49
  f'st.secrets has no attribute "{attr_name}". '
51
50
  "Did you forget to add it to secrets.toml, mount it to secret directory, or the app settings "
@@ -148,7 +147,7 @@ class AttrDict(Mapping[str, Any]):
148
147
  to provide dot access to nested secrets.
149
148
  """
150
149
 
151
- def __init__(self, value):
150
+ def __init__(self, value: Mapping[str, Any]) -> None:
152
151
  self.__dict__["__nested_secrets__"] = dict(value)
153
152
 
154
153
  @staticmethod
@@ -197,7 +196,7 @@ class Secrets(Mapping[str, Any]):
197
196
  Safe to use from multiple threads.
198
197
  """
199
198
 
200
- def __init__(self):
199
+ def __init__(self) -> None:
201
200
  # Our secrets dict.
202
201
  self._secrets: Mapping[str, Any] | None = None
203
202
  self._lock = threading.RLock()
@@ -360,7 +359,7 @@ class Secrets(Mapping[str, Any]):
360
359
 
361
360
  secrets = {}
362
361
 
363
- file_paths = st.config.get_option("secrets.files")
362
+ file_paths = config.get_option("secrets.files")
364
363
  found_secrets_file = False
365
364
  for path in file_paths:
366
365
  path_secrets, found_secrets_file_in_path = self._parse_file_path(path)
@@ -413,7 +412,7 @@ class Secrets(Mapping[str, Any]):
413
412
  if self._file_watchers_installed:
414
413
  return
415
414
 
416
- file_paths = st.config.get_option("secrets.files")
415
+ file_paths = config.get_option("secrets.files")
417
416
  for path in file_paths:
418
417
  try:
419
418
  if path.endswith(".toml"):
@@ -192,7 +192,7 @@ class QueryParams(MutableMapping[str, str]):
192
192
  if key in EMBED_QUERY_PARAMS_KEYS and preserve_embed
193
193
  }
194
194
 
195
- def _ensure_single_query_api_used(self):
195
+ def _ensure_single_query_api_used(self) -> None:
196
196
  ctx = get_script_run_ctx()
197
197
  if ctx is None:
198
198
  return
@@ -90,7 +90,7 @@ class CacheStatsProvider(Protocol):
90
90
 
91
91
 
92
92
  class StatsManager:
93
- def __init__(self):
93
+ def __init__(self) -> None:
94
94
  self._cache_stats_providers: list[CacheStatsProvider] = []
95
95
 
96
96
  def register_provider(self, provider: CacheStatsProvider) -> None:
@@ -51,7 +51,7 @@
51
51
  <script>
52
52
  window.prerenderReady = false
53
53
  </script>
54
- <script type="module" crossorigin src="./static/js/index.C1TEsRV0.js"></script>
54
+ <script type="module" crossorigin src="./static/js/index.Dqcp7EZB.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.C1TEsRV0.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
+ import{r,E as a,_ as n}from"./index.Dqcp7EZB.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.C1TEsRV0.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};
1
+ import{r as e,E as n,_ as a}from"./index.Dqcp7EZB.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};