Merge branch 'master' into bagatur/ruff_0_5_3

This commit is contained in:
Bagatur
2024-07-19 09:02:00 -07:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -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)

View File

@@ -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"