Remove cleared_value (#4685)

* Remove cleared_value

* CHANGELOG
This commit is contained in:
Freddy Boulton 2023-06-26 17:19:07 -04:00 committed by GitHub
parent b5121a96b2
commit 86e3eec311
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1 additions and 7 deletions

View File

@ -28,6 +28,7 @@
- Use `typing.Literal` where possible in gradio library and client by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4608](https://github.com/gradio-app/gradio/pull/4608)
- Remove unnecessary mock json files for frontend E2E tests by [@dawoodkhan82](https://github.com/dawoodkhan82) in [PR 4625](https://github.com/gradio-app/gradio/pull/4625)
- Update depedencies by [@pngwn](https://github.com/pngwn) in [PR 4643](https://github.com/gradio-app/gradio/pull/4643)
- Remove `cleared_value` from some components as its no longer used internally by [@freddyaboulton](https://github.com/freddyaboulton) in [PR 4685](https://github.com/gradio-app/gradio/pull/4685)
## Breaking Changes:

View File

@ -70,7 +70,6 @@ class CheckboxGroup(
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
"""
self.choices = choices or []
self.cleared_value = []
valid_types = ["value", "index"]
if type not in valid_types:
raise ValueError(

View File

@ -62,7 +62,6 @@ class ColorPicker(
elem_id: An optional string that is assigned as the id of this component in the HTML DOM. Can be used for targeting CSS styles.
elem_classes: An optional list of strings that are assigned as the classes of this component in the HTML DOM. Can be used for targeting CSS styles.
"""
self.cleared_value = "#000000"
IOComponent.__init__(
self,
label=label,

View File

@ -124,8 +124,6 @@ class Dropdown(
**kwargs,
)
self.cleared_value = self.value or ([] if multiselect else "")
def api_info(self) -> dict[str, dict | bool]:
if self.multiselect:
type = {

View File

@ -100,7 +100,6 @@ class Radio(
**kwargs,
)
NeighborInterpretable.__init__(self)
self.cleared_value = self.value
def get_config(self):
return {

View File

@ -105,7 +105,6 @@ class Slider(
**kwargs,
)
NeighborInterpretable.__init__(self)
self.cleared_value = self.value
def api_info(self) -> dict[str, dict | bool]:
return {

View File

@ -124,7 +124,6 @@ class Textbox(
**kwargs,
)
TokenInterpretable.__init__(self)
self.cleared_value = ""
self.type = type
def get_config(self):