streamlit-nightly 1.43.3.dev20250312__py3-none-any.whl → 1.43.3.dev20250313__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 (151) hide show
  1. streamlit/auth_util.py +2 -1
  2. streamlit/commands/experimental_query_params.py +1 -1
  3. streamlit/commands/logo.py +3 -3
  4. streamlit/components/v1/__init__.py +1 -3
  5. streamlit/config.py +3 -2
  6. streamlit/config_option.py +1 -3
  7. streamlit/connections/snowflake_connection.py +0 -1
  8. streamlit/connections/sql_connection.py +0 -1
  9. streamlit/dataframe_util.py +7 -6
  10. streamlit/delta_generator_singletons.py +2 -2
  11. streamlit/elements/arrow.py +0 -1
  12. streamlit/elements/exception.py +3 -1
  13. streamlit/elements/form.py +3 -3
  14. streamlit/elements/json.py +2 -2
  15. streamlit/elements/layouts.py +0 -5
  16. streamlit/elements/lib/built_in_chart_utils.py +1 -2
  17. streamlit/elements/lib/column_config_utils.py +0 -3
  18. streamlit/elements/lib/column_types.py +6 -39
  19. streamlit/elements/lib/image_utils.py +2 -1
  20. streamlit/elements/lib/options_selector_utils.py +6 -3
  21. streamlit/elements/lib/subtitle_utils.py +2 -0
  22. streamlit/elements/lib/utils.py +0 -2
  23. streamlit/elements/media.py +2 -1
  24. streamlit/elements/metric.py +0 -1
  25. streamlit/elements/progress.py +1 -1
  26. streamlit/elements/text.py +2 -2
  27. streamlit/elements/vega_charts.py +2 -1
  28. streamlit/elements/widgets/audio_input.py +2 -1
  29. streamlit/elements/widgets/button.py +0 -1
  30. streamlit/elements/widgets/button_group.py +2 -3
  31. streamlit/elements/widgets/data_editor.py +2 -3
  32. streamlit/elements/widgets/slider.py +1 -1
  33. streamlit/elements/widgets/text_widgets.py +1 -0
  34. streamlit/elements/write.py +0 -1
  35. streamlit/errors.py +4 -2
  36. streamlit/external/langchain/streamlit_callback_handler.py +1 -2
  37. streamlit/file_util.py +4 -2
  38. streamlit/navigation/page.py +0 -1
  39. streamlit/platform.py +1 -3
  40. streamlit/runtime/caching/cache_data_api.py +5 -5
  41. streamlit/runtime/caching/cache_errors.py +1 -1
  42. streamlit/runtime/caching/cache_resource_api.py +4 -4
  43. streamlit/runtime/caching/cache_utils.py +6 -4
  44. streamlit/runtime/caching/storage/cache_storage_protocol.py +6 -6
  45. streamlit/runtime/caching/storage/dummy_cache_storage.py +2 -2
  46. streamlit/runtime/caching/storage/in_memory_cache_storage_wrapper.py +6 -6
  47. streamlit/runtime/caching/storage/local_disk_cache_storage.py +6 -6
  48. streamlit/runtime/connection_factory.py +0 -1
  49. streamlit/runtime/context.py +1 -1
  50. streamlit/runtime/credentials.py +1 -1
  51. streamlit/runtime/forward_msg_cache.py +1 -1
  52. streamlit/runtime/forward_msg_queue.py +2 -1
  53. streamlit/runtime/fragment.py +2 -1
  54. streamlit/runtime/memory_media_file_storage.py +2 -2
  55. streamlit/runtime/metrics_util.py +2 -2
  56. streamlit/runtime/runtime_util.py +1 -1
  57. streamlit/runtime/scriptrunner/script_runner.py +1 -1
  58. streamlit/runtime/scriptrunner_utils/exceptions.py +1 -1
  59. streamlit/runtime/scriptrunner_utils/script_run_context.py +1 -0
  60. streamlit/runtime/secrets.py +5 -3
  61. streamlit/runtime/state/common.py +1 -1
  62. streamlit/runtime/state/safe_session_state.py +1 -1
  63. streamlit/runtime/state/session_state.py +4 -3
  64. streamlit/runtime/stats.py +1 -1
  65. streamlit/runtime/uploaded_file_manager.py +4 -3
  66. streamlit/static/index.html +1 -1
  67. streamlit/static/static/js/{FileDownload.esm.C9csNfwR.js → FileDownload.esm.imTamlxP.js} +1 -1
  68. streamlit/static/static/js/{FileHelper.CTWNHaVI.js → FileHelper.BwPSCUvG.js} +1 -1
  69. streamlit/static/static/js/{FormClearHelper.1VkFJY3v.js → FormClearHelper.DB5q2Avl.js} +1 -1
  70. streamlit/static/static/js/{Hooks.vPqq3xQ5.js → Hooks.Cxijo2P7.js} +1 -1
  71. streamlit/static/static/js/{InputInstructions.7jABRwB0.js → InputInstructions.B3OvMrKL.js} +1 -1
  72. streamlit/static/static/js/{ProgressBar.BWY8ITDS.js → ProgressBar.DmTol130.js} +1 -1
  73. streamlit/static/static/js/{RenderInPortalIfExists.CP_sn1OG.js → RenderInPortalIfExists.B8t62565.js} +1 -1
  74. streamlit/static/static/js/{Toolbar.DzqMcgvB.js → Toolbar.CbG49UPG.js} +1 -1
  75. streamlit/static/static/js/{base-input.DjuthXF0.js → base-input.D7sJ1S2g.js} +1 -1
  76. streamlit/static/static/js/{checkbox.BddRUN3_.js → checkbox.0Qx7AQxA.js} +1 -1
  77. streamlit/static/static/js/{createSuper.BAGgahBq.js → createSuper.DYiyAta_.js} +1 -1
  78. streamlit/static/static/js/{data-grid-overlay-editor.Bscjz8_-.js → data-grid-overlay-editor.DH61CZYo.js} +1 -1
  79. streamlit/static/static/js/{downloader.BgDSv-Ig.js → downloader.ClUad3SK.js} +1 -1
  80. streamlit/static/static/js/{es6.3kVHyEdR.js → es6.oePMPTIo.js} +2 -2
  81. streamlit/static/static/js/{iframeResizer.contentWindow.n2oqEwdf.js → iframeResizer.contentWindow.DWkIX4K7.js} +1 -1
  82. streamlit/static/static/js/{index.C8ZHYetm.js → index.1VrMb7Gq.js} +1 -1
  83. streamlit/static/static/js/{index.zrNj-omI.js → index.62zz5frt.js} +1 -1
  84. streamlit/static/static/js/{index.k2DDVmzp.js → index.BJRyQckV.js} +1 -1
  85. streamlit/static/static/js/{index.CrZncPLs.js → index.BQVZQA1G.js} +1 -1
  86. streamlit/static/static/js/{index.UJT9uVs_.js → index.BSZRb65z.js} +1 -1
  87. streamlit/static/static/js/{index.N6CP_9Qh.js → index.BUJE3tb_.js} +1 -1
  88. streamlit/static/static/js/{index.mMuChmJi.js → index.BWsaTYC-.js} +1 -1
  89. streamlit/static/static/js/{index.ChDimwy6.js → index.BccrUqFL.js} +1 -1
  90. streamlit/static/static/js/{index.CFbiFnmq.js → index.BhzKPoO6.js} +1 -1
  91. streamlit/static/static/js/{index.FJszpQ-y.js → index.BpNXx3zc.js} +5 -5
  92. streamlit/static/static/js/{index.B1ZLFKil.js → index.BzEstIKX.js} +1 -1
  93. streamlit/static/static/js/{index.j6cgFK9c.js → index.C-ilKj2l.js} +1 -1
  94. streamlit/static/static/js/{index.D3EE2F77.js → index.CCAIkxXD.js} +2367 -1541
  95. streamlit/static/static/js/{index.S_LaABz9.js → index.CEXlj4h2.js} +1 -1
  96. streamlit/static/static/js/{index.CYrF9jN2.js → index.CEtBn4Yo.js} +1 -1
  97. streamlit/static/static/js/{index.D3uVQMaA.js → index.CM7PC5PD.js} +1 -1
  98. streamlit/static/static/js/{index.Dv6XiWKs.js → index.CSLXWDcG.js} +1 -1
  99. streamlit/static/static/js/{index.Cj7yHfOR.js → index.CqywW5KK.js} +1 -1
  100. streamlit/static/static/js/{index.D7k3QVrz.js → index.CyRCgpSs.js} +1 -1
  101. streamlit/static/static/js/{index.pEU90S1o.js → index.CzFs8nXc.js} +3 -3
  102. streamlit/static/static/js/{index.DAghU1FB.js → index.Czxn5B2N.js} +1 -1
  103. streamlit/static/static/js/{index.B8IuPu4x.js → index.D0OLo5Dp.js} +1 -1
  104. streamlit/static/static/js/{index.BaYVwylD.js → index.D2JlVfHE.js} +1 -1
  105. streamlit/static/static/js/{index.OtBp-Blq.js → index.DJRmF7dm.js} +1 -1
  106. streamlit/static/static/js/{index.C28BRw13.js → index.Dd9D963h.js} +1 -1
  107. streamlit/static/static/js/{index.DAAc9Gb3.js → index.DhcpqbOJ.js} +1 -1
  108. streamlit/static/static/js/{index.DbI6X421.js → index.DlEF0vUx.js} +1 -1
  109. streamlit/static/static/js/{index.BNTyamf9.js → index.DnJimAdR.js} +1 -1
  110. streamlit/static/static/js/{index.BfTunuGf.js → index.DoqMrowT.js} +1 -1
  111. streamlit/static/static/js/{index.BPcgpI5G.js → index.DqsHy8ck.js} +1 -1
  112. streamlit/static/static/js/{index.3k9e_sFT.js → index.DtS10fdK.js} +1 -1
  113. streamlit/static/static/js/{index.BQXOwXQG.js → index.XZw2NTV4.js} +1 -1
  114. streamlit/static/static/js/{index.svH5ea22.js → index.YB9Oe71d.js} +1 -1
  115. streamlit/static/static/js/{index.DlXteNnv.js → index.axjxDsFs.js} +1 -1
  116. streamlit/static/static/js/{index.Bd5GUMH8.js → index.kB2IGVOe.js} +1 -1
  117. streamlit/static/static/js/{index.0JqsAt5p.js → index.tVO_vJdT.js} +1 -1
  118. streamlit/static/static/js/{index.CrjCtGqg.js → index.uPQFE7KD.js} +1 -1
  119. streamlit/static/static/js/{input.A7Xel5Mz.js → input.od7ufwko.js} +1 -1
  120. streamlit/static/static/js/{memory.DKAi1aOw.js → memory.B4tdC6o-.js} +1 -1
  121. streamlit/static/static/js/{mergeWith.BOXngkwE.js → mergeWith.BIQlVIWW.js} +1 -1
  122. streamlit/static/static/js/{number-overlay-editor.Dr9nZLr4.js → number-overlay-editor.yJDCpy9b.js} +1 -1
  123. streamlit/static/static/js/{possibleConstructorReturn.Dmq70n5Q.js → possibleConstructorReturn.CarGSmuW.js} +1 -1
  124. streamlit/static/static/js/{sandbox.OiNVhKVk.js → sandbox.DMCKOK6i.js} +1 -1
  125. streamlit/static/static/js/{textarea.BvcErhuX.js → textarea.CKKbJt6B.js} +1 -1
  126. streamlit/static/static/js/{timepicker.BndxQ_56.js → timepicker.BgsARtBm.js} +1 -1
  127. streamlit/static/static/js/{toConsumableArray.Bvyh5k2t.js → toConsumableArray.DXHhbr1a.js} +1 -1
  128. streamlit/static/static/js/{uniqueId.BJXawxf6.js → uniqueId.Cb5oTCCd.js} +1 -1
  129. streamlit/static/static/js/{useBasicWidgetState.-z6NaxAe.js → useBasicWidgetState.8rZ80dWq.js} +1 -1
  130. streamlit/static/static/js/{useOnInputChange.DvBUKld6.js → useOnInputChange.Bc5KC47X.js} +1 -1
  131. streamlit/static/static/js/{withFullScreenWrapper.CubK7zml.js → withFullScreenWrapper.CSP3iCNz.js} +1 -1
  132. streamlit/string_util.py +3 -2
  133. streamlit/testing/v1/element_tree.py +30 -30
  134. streamlit/testing/v1/util.py +2 -1
  135. streamlit/time_util.py +1 -3
  136. streamlit/type_util.py +2 -1
  137. streamlit/user_info.py +0 -1
  138. streamlit/watcher/event_based_path_watcher.py +1 -1
  139. streamlit/web/bootstrap.py +3 -1
  140. streamlit/web/cache_storage_manager_config.py +1 -1
  141. streamlit/web/cli.py +2 -2
  142. streamlit/web/server/authlib_tornado_integration.py +1 -1
  143. streamlit/web/server/browser_websocket_handler.py +2 -1
  144. streamlit/web/server/routes.py +2 -2
  145. streamlit/web/server/server_util.py +2 -4
  146. {streamlit_nightly-1.43.3.dev20250312.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/METADATA +1 -1
  147. {streamlit_nightly-1.43.3.dev20250312.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/RECORD +151 -151
  148. {streamlit_nightly-1.43.3.dev20250312.data → streamlit_nightly-1.43.3.dev20250313.data}/scripts/streamlit.cmd +0 -0
  149. {streamlit_nightly-1.43.3.dev20250312.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/WHEEL +0 -0
  150. {streamlit_nightly-1.43.3.dev20250312.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/entry_points.txt +0 -0
  151. {streamlit_nightly-1.43.3.dev20250312.dist-info → streamlit_nightly-1.43.3.dev20250313.dist-info}/top_level.txt +0 -0
@@ -86,7 +86,7 @@ T = TypeVar("T")
86
86
 
87
87
  @dataclass
88
88
  class InitialValue:
89
- """This class is used to represent the initial value of a widget."""
89
+ """Used to represent the initial value of a widget."""
90
90
 
91
91
  pass
92
92
 
@@ -136,7 +136,7 @@ class Element(ABC):
136
136
  ...
137
137
 
138
138
  def __getattr__(self, name: str) -> Any:
139
- """Fallback attempt to get an attribute from the proto"""
139
+ """Fallback attempt to get an attribute from the proto."""
140
140
  return getattr(self.proto, name)
141
141
 
142
142
  def run(self, *, timeout: float | None = None) -> AppTest:
@@ -323,7 +323,7 @@ class Button(Widget):
323
323
 
324
324
  @property
325
325
  def value(self) -> bool:
326
- """The value of the button. (bool)"""
326
+ """The value of the button. (bool)""" # noqa: D400
327
327
  if self._value:
328
328
  return self._value
329
329
  else:
@@ -368,7 +368,7 @@ class ChatInput(Widget):
368
368
 
369
369
  @property
370
370
  def value(self) -> str | None:
371
- """The value of the widget. (str)"""
371
+ """The value of the widget. (str)""" # noqa: D400
372
372
  if self._value:
373
373
  return self._value
374
374
  else:
@@ -401,7 +401,7 @@ class Checkbox(Widget):
401
401
 
402
402
  @property
403
403
  def value(self) -> bool:
404
- """The value of the widget. (bool)"""
404
+ """The value of the widget. (bool)""" # noqa: D400
405
405
  if self._value is not None:
406
406
  return self._value
407
407
  else:
@@ -441,7 +441,7 @@ class Code(Element):
441
441
 
442
442
  @property
443
443
  def value(self) -> str:
444
- """The value of the element. (str)"""
444
+ """The value of the element. (str)""" # noqa: D400
445
445
  return self.proto.code_text
446
446
 
447
447
 
@@ -462,7 +462,7 @@ class ColorPicker(Widget):
462
462
 
463
463
  @property
464
464
  def value(self) -> str:
465
- """The currently selected value as a hex string. (str)"""
465
+ """The currently selected value as a hex string. (str)""" # noqa: D400
466
466
  if self._value is not None:
467
467
  return self._value
468
468
  else:
@@ -548,7 +548,7 @@ class DateInput(Widget):
548
548
 
549
549
  @property
550
550
  def value(self) -> DateWidgetReturn:
551
- """The value of the widget. (date or Tuple of date)"""
551
+ """The value of the widget. (date or Tuple of date)""" # noqa: D400
552
552
  if not isinstance(self._value, InitialValue):
553
553
  parsed, _ = _parse_date_value(self._value)
554
554
  return tuple(parsed) if parsed is not None else None # type: ignore
@@ -721,7 +721,7 @@ class ButtonGroup(Widget, Generic[T]):
721
721
 
722
722
  @property
723
723
  def value(self) -> list[T]:
724
- """The currently selected values from the options. (list)"""
724
+ """The currently selected values from the options. (list)""" # noqa: D400
725
725
  if self._value is not None:
726
726
  return self._value
727
727
  else:
@@ -731,17 +731,17 @@ class ButtonGroup(Widget, Generic[T]):
731
731
 
732
732
  @property
733
733
  def indices(self) -> Sequence[int]:
734
- """The indices of the currently selected values from the options. (list)"""
734
+ """The indices of the currently selected values from the options. (list)""" # noqa: D400
735
735
  return [self.options.index(self.format_func(v)) for v in self.value]
736
736
 
737
737
  @property
738
738
  def format_func(self) -> Callable[[Any], Any]:
739
- """The widget's formatting function for displaying options. (callable)"""
739
+ """The widget's formatting function for displaying options. (callable)""" # noqa: D400
740
740
  ss = self.root.session_state
741
741
  return cast(Callable[[Any], Any], ss[TESTING_KEY][self.id])
742
742
 
743
743
  def set_value(self, v: list[T]) -> ButtonGroup[T]:
744
- """Set the value of the multiselect widget. (list)"""
744
+ """Set the value of the multiselect widget. (list)""" # noqa: D400
745
745
 
746
746
  self._value = v
747
747
  return self
@@ -809,7 +809,7 @@ class Multiselect(Widget, Generic[T]):
809
809
 
810
810
  @property
811
811
  def value(self) -> list[T]:
812
- """The currently selected values from the options. (list)"""
812
+ """The currently selected values from the options. (list)""" # noqa: D400
813
813
  if self._value is not None:
814
814
  return self._value
815
815
  else:
@@ -819,17 +819,17 @@ class Multiselect(Widget, Generic[T]):
819
819
 
820
820
  @property
821
821
  def indices(self) -> Sequence[int]:
822
- """The indices of the currently selected values from the options. (list)"""
822
+ """The indices of the currently selected values from the options. (list)""" # noqa: D400
823
823
  return [self.options.index(self.format_func(v)) for v in self.value]
824
824
 
825
825
  @property
826
826
  def format_func(self) -> Callable[[Any], Any]:
827
- """The widget's formatting function for displaying options. (callable)"""
827
+ """The widget's formatting function for displaying options. (callable)""" # noqa: D400
828
828
  ss = self.root.session_state
829
829
  return cast(Callable[[Any], Any], ss[TESTING_KEY][self.id])
830
830
 
831
831
  def set_value(self, v: list[T]) -> Multiselect[T]:
832
- """Set the value of the multiselect widget. (list)"""
832
+ """Set the value of the multiselect widget. (list)""" # noqa: D400
833
833
 
834
834
  self._value = v
835
835
  return self
@@ -952,14 +952,14 @@ class Radio(Widget, Generic[T]):
952
952
 
953
953
  @property
954
954
  def index(self) -> int | None:
955
- """The index of the current selection. (int)"""
955
+ """The index of the current selection. (int)""" # noqa: D400
956
956
  if self.value is None:
957
957
  return None
958
958
  return self.options.index(self.format_func(self.value))
959
959
 
960
960
  @property
961
961
  def value(self) -> T | None:
962
- """The currently selected value from the options. (Any)"""
962
+ """The currently selected value from the options. (Any)""" # noqa: D400
963
963
  if not isinstance(self._value, InitialValue):
964
964
  return self._value
965
965
  else:
@@ -969,7 +969,7 @@ class Radio(Widget, Generic[T]):
969
969
 
970
970
  @property
971
971
  def format_func(self) -> Callable[[Any], Any]:
972
- """The widget's formatting function for displaying options. (callable)"""
972
+ """The widget's formatting function for displaying options. (callable)""" # noqa: D400
973
973
  ss = self.root.session_state
974
974
  return cast(Callable[[Any], Any], ss[TESTING_KEY][self.id])
975
975
 
@@ -1011,7 +1011,7 @@ class Selectbox(Widget, Generic[T]):
1011
1011
 
1012
1012
  @property
1013
1013
  def index(self) -> int | None:
1014
- """The index of the current selection. (int)"""
1014
+ """The index of the current selection. (int)""" # noqa: D400
1015
1015
  if self.value is None:
1016
1016
  return None
1017
1017
 
@@ -1021,7 +1021,7 @@ class Selectbox(Widget, Generic[T]):
1021
1021
 
1022
1022
  @property
1023
1023
  def value(self) -> T | None:
1024
- """The currently selected value from the options. (Any)"""
1024
+ """The currently selected value from the options. (Any)""" # noqa: D400
1025
1025
  if not isinstance(self._value, InitialValue):
1026
1026
  return self._value
1027
1027
  else:
@@ -1031,7 +1031,7 @@ class Selectbox(Widget, Generic[T]):
1031
1031
 
1032
1032
  @property
1033
1033
  def format_func(self) -> Callable[[Any], Any]:
1034
- """The widget's formatting function for displaying options. (callable)"""
1034
+ """The widget's formatting function for displaying options. (callable)""" # noqa: D400
1035
1035
  ss = self.root.session_state
1036
1036
  return cast(Callable[[Any], Any], ss[TESTING_KEY][self.id])
1037
1037
 
@@ -1104,7 +1104,7 @@ class SelectSlider(Widget, Generic[T]):
1104
1104
 
1105
1105
  @property
1106
1106
  def value(self) -> T | Sequence[T]:
1107
- """The currently selected value or range. (Any or Sequence of Any)"""
1107
+ """The currently selected value or range. (Any or Sequence of Any)""" # noqa: D400
1108
1108
  if self._value is not None:
1109
1109
  return self._value
1110
1110
  else:
@@ -1115,7 +1115,7 @@ class SelectSlider(Widget, Generic[T]):
1115
1115
 
1116
1116
  @property
1117
1117
  def format_func(self) -> Callable[[Any], Any]:
1118
- """The widget's formatting function for displaying options. (callable)"""
1118
+ """The widget's formatting function for displaying options. (callable)""" # noqa: D400
1119
1119
  ss = self.root.session_state
1120
1120
  return cast(Callable[[Any], Any], ss[TESTING_KEY][self.id])
1121
1121
 
@@ -1163,7 +1163,7 @@ class Slider(Widget, Generic[SliderValueT]):
1163
1163
 
1164
1164
  @property
1165
1165
  def value(self) -> SliderValueT | Sequence[SliderValueT]:
1166
- """The currently selected value or range. (Any or Sequence of Any)"""
1166
+ """The currently selected value or range. (Any or Sequence of Any)""" # noqa: D400
1167
1167
  if self._value is not None:
1168
1168
  return self._value
1169
1169
  else:
@@ -1207,7 +1207,7 @@ class Text(Element):
1207
1207
 
1208
1208
  @property
1209
1209
  def value(self) -> str:
1210
- """The value of the element. (str)"""
1210
+ """The value of the element. (str)""" # noqa: D400
1211
1211
  return self.proto.body
1212
1212
 
1213
1213
 
@@ -1244,7 +1244,7 @@ class TextArea(Widget):
1244
1244
 
1245
1245
  @property
1246
1246
  def value(self) -> str | None:
1247
- """The current value of the widget. (str)"""
1247
+ """The current value of the widget. (str)""" # noqa: D400
1248
1248
  if not isinstance(self._value, InitialValue):
1249
1249
  return self._value
1250
1250
  else:
@@ -1297,7 +1297,7 @@ class TextInput(Widget):
1297
1297
 
1298
1298
  @property
1299
1299
  def value(self) -> str | None:
1300
- """The current value of the widget. (str)"""
1300
+ """The current value of the widget. (str)""" # noqa: D400
1301
1301
  if not isinstance(self._value, InitialValue):
1302
1302
  return self._value
1303
1303
  else:
@@ -1354,7 +1354,7 @@ class TimeInput(Widget):
1354
1354
 
1355
1355
  @property
1356
1356
  def value(self) -> time | None:
1357
- """The current value of the widget. (time)"""
1357
+ """The current value of the widget. (time)""" # noqa: D400
1358
1358
  if not isinstance(self._value, InitialValue):
1359
1359
  v = self._value
1360
1360
  v = v.time() if isinstance(v, datetime) else v
@@ -1420,7 +1420,7 @@ class Toggle(Widget):
1420
1420
 
1421
1421
  @property
1422
1422
  def value(self) -> bool:
1423
- """The current value of the widget. (bool)"""
1423
+ """The current value of the widget. (bool)""" # noqa: D400
1424
1424
  if self._value is not None:
1425
1425
  return self._value
1426
1426
  else:
@@ -25,7 +25,8 @@ def patch_config_options(config_overrides: dict[str, Any]):
25
25
  """A context manager that overrides config options. It can
26
26
  also be used as a function decorator.
27
27
 
28
- Examples:
28
+ Examples
29
+ --------
29
30
  >>> with patch_config_options({"server.headless": True}):
30
31
  ... assert config.get_option("server.headless") is True
31
32
  ... # Other test code that relies on these options
streamlit/time_util.py CHANGED
@@ -51,9 +51,7 @@ def time_to_seconds(t: float | timedelta | str | None) -> float: ...
51
51
  def time_to_seconds(
52
52
  t: float | timedelta | str | None, *, coerce_none_to_inf: bool = True
53
53
  ) -> float | None:
54
- """
55
- Convert a time string value to a float representing "number of seconds".
56
- """
54
+ """Convert a time string value to a float representing "number of seconds"."""
57
55
  if coerce_none_to_inf and t is None:
58
56
  return math.inf
59
57
  if isinstance(t, timedelta):
streamlit/type_util.py CHANGED
@@ -386,7 +386,8 @@ def is_list_like(obj: object) -> TypeGuard[Sequence[Any]]:
386
386
  def check_python_comparable(seq: Sequence[Any]) -> None:
387
387
  """Check if the sequence elements support "python comparison".
388
388
  That means that the equality operator (==) returns a boolean value.
389
- Which is not True for e.g. numpy arrays and pandas series."""
389
+ Which is not True for e.g. numpy arrays and pandas series.
390
+ """
390
391
  try:
391
392
  bool(seq[0] == seq[0])
392
393
  except LookupError:
streamlit/user_info.py CHANGED
@@ -130,7 +130,6 @@ def login(provider: str | None = None) -> None:
130
130
 
131
131
  Examples
132
132
  --------
133
-
134
133
  **Example 1: Use an unnamed default identity provider**
135
134
 
136
135
  If you do not specify a name for your provider, specify all settings within
@@ -66,7 +66,7 @@ def _get_abs_folder_path(path: str) -> str:
66
66
 
67
67
 
68
68
  class EventBasedPathWatcher:
69
- """Watches a single path on disk using watchdog"""
69
+ """Watches a single path on disk using watchdog."""
70
70
 
71
71
  @staticmethod
72
72
  def close_all() -> None:
@@ -137,7 +137,9 @@ def _on_server_start(server: Server) -> None:
137
137
 
138
138
 
139
139
  def _fix_pydeck_mapbox_api_warning() -> None:
140
- """Sets MAPBOX_API_KEY environment variable needed for PyDeck otherwise it will throw an exception"""
140
+ """Sets MAPBOX_API_KEY environment variable needed for PyDeck otherwise it
141
+ will throw an exception.
142
+ """
141
143
 
142
144
  os.environ["MAPBOX_API_KEY"] = config.get_option("mapbox.token")
143
145
 
@@ -27,7 +27,7 @@ if TYPE_CHECKING:
27
27
  def create_default_cache_storage_manager() -> CacheStorageManager:
28
28
  """
29
29
  Get the cache storage manager.
30
- It would be used both in server.py and in cli.py to have unified cache storage
30
+ It would be used both in server.py and in cli.py to have unified cache storage.
31
31
 
32
32
  Returns
33
33
  -------
streamlit/web/cli.py CHANGED
@@ -110,7 +110,7 @@ def configurator_options(func: F) -> F:
110
110
 
111
111
 
112
112
  def _download_remote(main_script_path: str, url_path: str) -> None:
113
- """Fetch remote file at url_path to main_script_path"""
113
+ """Fetch remote file at url_path to main_script_path."""
114
114
  import requests
115
115
 
116
116
  with open(main_script_path, "wb") as fp:
@@ -133,7 +133,7 @@ def main(log_level="info"):
133
133
  Or use the line below to run your own script:
134
134
 
135
135
  $ streamlit run your_script.py
136
- """
136
+ """ # noqa: D400
137
137
 
138
138
  if log_level:
139
139
  from streamlit.logger import get_logger
@@ -40,7 +40,7 @@ class TornadoIntegration(FrameworkIntegration): # type: ignore[misc]
40
40
  oauth: TornadoOAuth, name: str, params: Sequence[str]
41
41
  ) -> dict[str, Any]:
42
42
  """Configure Authlib integration with provider parameters
43
- specified in secrets.toml
43
+ specified in secrets.toml.
44
44
  """
45
45
 
46
46
  # oauth.config here is an auth section from secrets.toml
@@ -47,7 +47,7 @@ _LOGGER: Final = get_logger(__name__)
47
47
 
48
48
 
49
49
  class BrowserWebSocketHandler(WebSocketHandler, SessionClient):
50
- """Handles a WebSocket connection from the browser"""
50
+ """Handles a WebSocket connection from the browser."""
51
51
 
52
52
  def initialize(self, runtime: Runtime) -> None:
53
53
  self._runtime = runtime
@@ -69,6 +69,7 @@ class BrowserWebSocketHandler(WebSocketHandler, SessionClient):
69
69
  ) -> bytes | None:
70
70
  """Get a signed cookie from the request. Added for compatibility with
71
71
  Tornado < 6.3.0.
72
+
72
73
  See release notes: https://www.tornadoweb.org/en/stable/releases/v6.3.0.html#deprecation-notices
73
74
  """
74
75
  try:
@@ -141,7 +141,7 @@ class _SpecialRequestHandler(tornado.web.RequestHandler):
141
141
 
142
142
  class HealthHandler(_SpecialRequestHandler):
143
143
  def initialize(self, callback):
144
- """Initialize the handler
144
+ """Initialize the handler.
145
145
 
146
146
  Parameters
147
147
  ----------
@@ -242,7 +242,7 @@ class HostConfigHandler(_SpecialRequestHandler):
242
242
 
243
243
 
244
244
  class MessageCacheHandler(tornado.web.RequestHandler):
245
- """Returns ForwardMsgs from our MessageCache"""
245
+ """Returns ForwardMsgs from our MessageCache."""
246
246
 
247
247
  def initialize(self, cache):
248
248
  """Initializes the handler.
@@ -12,7 +12,7 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- """Server related utility functions"""
15
+ """Server related utility functions."""
16
16
 
17
17
  from __future__ import annotations
18
18
 
@@ -153,9 +153,7 @@ def _get_browser_address_bar_port() -> int:
153
153
 
154
154
 
155
155
  def emit_endpoint_deprecation_notice(handler: RequestHandler, new_path: str) -> None:
156
- """
157
- Emits the warning about deprecation of HTTP endpoint in the HTTP header.
158
- """
156
+ """Emits the warning about deprecation of HTTP endpoint in the HTTP header."""
159
157
  handler.set_header("Deprecation", True)
160
158
  new_url = urljoin(f"{handler.request.protocol}://{handler.request.host}", new_path)
161
159
  handler.set_header("Link", f'<{new_url}>; rel="alternate"')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: streamlit-nightly
3
- Version: 1.43.3.dev20250312
3
+ Version: 1.43.3.dev20250313
4
4
  Summary: A faster way to build and share data apps
5
5
  Home-page: https://streamlit.io
6
6
  Author: Snowflake Inc