mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-17 11:29:58 +08:00
Do not show warnings when renaming api_names (#6424)
* warnings * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
1959471a8d
commit
2727f45fb0
5
.changeset/twelve-monkeys-move.md
Normal file
5
.changeset/twelve-monkeys-move.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"gradio": minor
|
||||
---
|
||||
|
||||
feat:Do not show warnings when renaming api_names
|
@ -925,7 +925,6 @@ class Blocks(BlockContext, BlocksEvents, metaclass=BlocksMeta):
|
||||
api_name, [dep["api_name"] for dep in self.dependencies]
|
||||
)
|
||||
if api_name != api_name_:
|
||||
warnings.warn(f"api_name {api_name} already exists, using {api_name_}")
|
||||
api_name = api_name_
|
||||
|
||||
if collects_event_data is None:
|
||||
@ -984,9 +983,6 @@ class Blocks(BlockContext, BlocksEvents, metaclass=BlocksMeta):
|
||||
[dep["api_name"] for dep in Context.root_block.dependencies],
|
||||
)
|
||||
if api_name != api_name_:
|
||||
warnings.warn(
|
||||
f"api_name {api_name} already exists, using {api_name_}"
|
||||
)
|
||||
dependency["api_name"] = api_name_
|
||||
dependency["cancels"] = [
|
||||
c + dependency_offset for c in dependency["cancels"]
|
||||
|
Loading…
Reference in New Issue
Block a user