core[patch]: core lint fix (#24447)

This commit is contained in:
Bagatur 2024-07-19 09:01:22 -07:00 committed by GitHub
parent 83f3d95ffa
commit cd19ba9a07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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"