Skip to content

Commit eaf8dce

Browse files
cbornetmdrxy
andauthored
chore: bump ruff version to 0.13 (#33043)
Co-authored-by: Mason Daugherty <[email protected]>
1 parent f82de1a commit eaf8dce

File tree

67 files changed

+626
-579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+626
-579
lines changed

libs/cli/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ langchain-cli = "langchain_cli.cli:app"
3030

3131
[dependency-groups]
3232
dev = ["pytest>=7.4.2,<9.0.0", "pytest-watcher>=0.3.4,<1.0.0"]
33-
lint = ["ruff>=0.12.2,<0.13", "mypy>=1.18.1,<1.19"]
33+
lint = ["ruff>=0.13.1,<0.14", "mypy>=1.18.1,<1.19"]
3434
test = ["langchain-core", "langchain"]
3535
typing = ["langchain"]
3636
test_integration = []

libs/cli/uv.lock

Lines changed: 24 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libs/core/langchain_core/_api/beta_decorator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def _fdel(instance: Any) -> None:
174174
def finalize(_wrapper: Callable[..., Any], new_doc: str) -> Any:
175175
"""Finalize the property."""
176176
return property(fget=_fget, fset=_fset, fdel=_fdel, doc=new_doc)
177+
177178
else:
178179
_name = _name or obj.__qualname__
179180
if not _obj_type:

libs/core/langchain_core/prompts/chat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,10 @@ class ChatPromptTemplate(BaseChatPromptTemplate):
813813
)
814814
815815
prompt_value = template.invoke(
816-
{"name": "Bob", "user_input": "What is your name?"}
816+
{
817+
"name": "Bob",
818+
"user_input": "What is your name?",
819+
}
817820
)
818821
# Output:
819822
# ChatPromptValue(

libs/core/langchain_core/prompts/few_shot.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,10 @@ class FewShotChatMessagePromptTemplate(
281281
]
282282
283283
example_prompt = ChatPromptTemplate.from_messages(
284-
[("human", "What is {input}?"), ("ai", "{output}")]
284+
[
285+
("human", "What is {input}?"),
286+
("ai", "{output}"),
287+
]
285288
)
286289
287290
few_shot_prompt = FewShotChatMessagePromptTemplate(

libs/core/langchain_core/runnables/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1397,7 +1397,10 @@ def some_tool(x: int, y: str) -> dict:
13971397
.. code-block:: python
13981398
13991399
template = ChatPromptTemplate.from_messages(
1400-
[("system", "You are Cat Agent 007"), ("human", "{question}")]
1400+
[
1401+
("system", "You are Cat Agent 007"),
1402+
("human", "{question}"),
1403+
]
14011404
).with_config({"run_name": "my_template", "tags": ["my_template"]})
14021405
14031406

libs/core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ readme = "README.md"
2626
repository = "https://github.com/langchain-ai/langchain"
2727

2828
[dependency-groups]
29-
lint = ["ruff>=0.12.2,<0.13.0"]
29+
lint = ["ruff>=0.13.1,<0.14.0"]
3030
typing = [
3131
"mypy>=1.18.1,<1.19.0",
3232
"types-pyyaml>=6.0.12.2,<7.0.0.0",

libs/core/tests/unit_tests/runnables/test_graph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ def test_mermaid_base_url_default() -> None:
583583

584584
# Verify that the URL was constructed with the default base URL
585585
assert mock_get.called
586-
args, kwargs = mock_get.call_args
586+
args = mock_get.call_args[0]
587587
url = args[0] # First argument to request.get is the URL
588588
assert url.startswith("https://mermaid.ink")
589589

@@ -604,7 +604,7 @@ def test_mermaid_base_url_custom() -> None:
604604

605605
# Verify that the URL was constructed with our custom base URL
606606
assert mock_get.called
607-
args, kwargs = mock_get.call_args
607+
args = mock_get.call_args[0]
608608
url = args[0] # First argument to request.get is the URL
609609
assert url.startswith(custom_url)
610610

@@ -626,7 +626,7 @@ def test_draw_mermaid_png_function_base_url() -> None:
626626

627627
# Verify that the URL was constructed with our custom base URL
628628
assert mock_get.called
629-
args, kwargs = mock_get.call_args
629+
args = mock_get.call_args[0]
630630
url = args[0] # First argument to request.get is the URL
631631
assert url.startswith(custom_url)
632632

@@ -650,7 +650,7 @@ def test_graph_draw_mermaid_png_base_url() -> None:
650650

651651
# Verify that the URL was constructed with our custom base URL
652652
assert mock_get.called
653-
args, kwargs = mock_get.call_args
653+
args = mock_get.call_args[0]
654654
url = args[0] # First argument to request.get is the URL
655655
assert url.startswith(custom_url)
656656

0 commit comments

Comments
 (0)