core[patch]: Do not hard coded name for RunnableBranch (#26276)

This is no longer necessary
This commit is contained in:
Eugene Yurtsev
2024-09-10 15:49:51 -04:00
committed by GitHub
parent 7975c1f0ca
commit ed412d89b4

View File

@@ -138,13 +138,6 @@ class RunnableBranch(RunnableSerializable[Input, Output]):
super().__init__(
branches=_branches,
default=default_,
# Hard-coding a name here because RunnableBranch is a generic
# and with pydantic 2, the class name with pydantic will capture
# include the parameterized type, which is not what we want.
# e.g., we'd get RunnableBranch[Input, Output] instead of RunnableBranch
# for the name. This information is already captured in the
# input and output types.
name="RunnableBranch",
) # type: ignore[call-arg]
model_config = ConfigDict(