Skip to content

The agent engineering platform.

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

Bagaturcd19ba9a075f
diff --git a/libs/core/langchain_core/tracers/log_stream.py b/libs/core/langchain_core/tracers/log_stream.py
index 6e8fc2a17b..ac154df622 100644
--- a/libs/core/langchain_core/tracers/log_stream.py
+++ b/libs/core/langchain_core/tracers/log_stream.py
@@ -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)
diff --git a/libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py b/libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py
index 0bb8d47815..9d5601f012 100644
--- a/libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py
+++ b/libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py
@@ -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"