mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-27 08:58:48 +00:00
core[patch]: core lint fix (#24447)
This commit is contained in:
parent
83f3d95ffa
commit
cd19ba9a07
@ -102,7 +102,7 @@ class RunLogPatch:
|
||||
self.ops = list(ops)
|
||||
|
||||
def __add__(self, other: Union[RunLogPatch, Any]) -> RunLog:
|
||||
if type(other) == RunLogPatch:
|
||||
if type(other) is RunLogPatch:
|
||||
ops = self.ops + other.ops
|
||||
state = jsonpatch.apply_patch(None, copy.deepcopy(ops))
|
||||
return RunLog(*ops, state=state)
|
||||
@ -132,7 +132,7 @@ class RunLog(RunLogPatch):
|
||||
self.state = state
|
||||
|
||||
def __add__(self, other: Union[RunLogPatch, Any]) -> RunLog:
|
||||
if type(other) == RunLogPatch:
|
||||
if type(other) is RunLogPatch:
|
||||
ops = self.ops + other.ops
|
||||
state = jsonpatch.apply_patch(self.state, other.ops)
|
||||
return RunLog(*ops, state=state)
|
||||
|
@ -48,7 +48,7 @@ def test_pydantic_parser_chaining(
|
||||
chain = prompt | model | parser
|
||||
|
||||
res = chain.invoke({})
|
||||
assert type(res) == pydantic_object
|
||||
assert type(res) is pydantic_object
|
||||
assert res.f_or_c == "C"
|
||||
assert res.temperature == 20
|
||||
assert res.forecast == "Sunny"
|
||||
|
Loading…
Reference in New Issue
Block a user