mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-22 23:47:36 +00:00
Lint
This commit is contained in:
parent
738d93215d
commit
06e89c1caa
@ -1531,7 +1531,9 @@ class RunnableBinding(Serializable, Runnable[Input, Output]):
|
|||||||
copy = cast(RunnableConfig, dict(self.config))
|
copy = cast(RunnableConfig, dict(self.config))
|
||||||
if config:
|
if config:
|
||||||
for key in config:
|
for key in config:
|
||||||
copy[key] = config[key] or copy.get(key)
|
# Even though the keys aren't literals this is correct
|
||||||
|
# because both dicts are same type
|
||||||
|
copy[key] = config[key] or copy.get(key) # type: ignore
|
||||||
return copy
|
return copy
|
||||||
|
|
||||||
def bind(self, **kwargs: Any) -> Runnable[Input, Output]:
|
def bind(self, **kwargs: Any) -> Runnable[Input, Output]:
|
||||||
|
@ -112,8 +112,10 @@ def patch_config(
|
|||||||
# If we're replacing callbacks we need to unset run_name and run_id
|
# If we're replacing callbacks we need to unset run_name and run_id
|
||||||
# As those should apply only to the same run as the original callbacks
|
# As those should apply only to the same run as the original callbacks
|
||||||
config["callbacks"] = callbacks
|
config["callbacks"] = callbacks
|
||||||
config["run_name"] = None
|
if "run_name" in config:
|
||||||
config["run_id"] = None
|
del config["run_name"]
|
||||||
|
if "run_id" in config:
|
||||||
|
del config["run_id"]
|
||||||
if recursion_limit is not None:
|
if recursion_limit is not None:
|
||||||
config["recursion_limit"] = recursion_limit
|
config["recursion_limit"] = recursion_limit
|
||||||
if max_concurrency is not None:
|
if max_concurrency is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user