Skip to content

Commit 99d8504

Browse files
authored
chore(core): docstring nits (#33285)
1 parent a9aa3f2 commit 99d8504

File tree

7 files changed

+17
-17
lines changed

7 files changed

+17
-17
lines changed

libs/core/langchain_core/_api/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
55
!!! warning
66
7-
This module and its submodules are for internal use only. Do not use them
8-
in your own code. We may change the API at any time with no warning.
7+
This module and its submodules are for internal use only. Do not use them in your
8+
own code. We may change the API at any time with no warning.
99
1010
"""
1111

libs/core/langchain_core/_api/beta_decorator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
77
!!! warning
88
9-
This module is for internal use only. Do not use it in your own code.
10-
We may change the API at any time with no warning.
9+
This module is for internal use only. Do not use it in your own code. We may change
10+
the API at any time with no warning.
1111
"""
1212

1313
import contextlib

libs/core/langchain_core/_api/deprecation.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
77
!!! warning
88
9-
This module is for internal use only. Do not use it in your own code.
10-
We may change the API at any time with no warning.
9+
This module is for internal use only. Do not use it in your own code. We may change
10+
the API at any time with no warning.
1111
"""
1212

1313
import contextlib
@@ -540,9 +540,9 @@ def rename_parameter(
540540
) -> Callable[[Callable[_P, _R]], Callable[_P, _R]]:
541541
"""Decorator indicating that parameter *old* of *func* is renamed to *new*.
542542
543-
The actual implementation of *func* should use *new*, not *old*. If *old*
544-
is passed to *func*, a DeprecationWarning is emitted, and its value is
545-
used, even if *new* is also passed by keyword.
543+
The actual implementation of *func* should use *new*, not *old*. If *old* is passed
544+
to *func*, a DeprecationWarning is emitted, and its value is used, even if *new* is
545+
also passed by keyword.
546546
547547
Args:
548548
since: The version in which the parameter was renamed.

libs/core/langchain_core/runnables/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,17 +1792,17 @@ def with_alisteners(
17921792
def format_t(timestamp: float) -> str:
17931793
return datetime.fromtimestamp(timestamp, tz=timezone.utc).isoformat()
17941794
1795-
async def test_runnable(time_to_sleep : int):
1795+
async def test_runnable(time_to_sleep: int):
17961796
print(f"Runnable[{time_to_sleep}s]: starts at {format_t(time.time())}")
17971797
await asyncio.sleep(time_to_sleep)
17981798
print(f"Runnable[{time_to_sleep}s]: ends at {format_t(time.time())}")
17991799
1800-
async def fn_start(run_obj : Runnable):
1800+
async def fn_start(run_obj: Runnable):
18011801
print(f"on start callback starts at {format_t(time.time())}")
18021802
await asyncio.sleep(3)
18031803
print(f"on start callback ends at {format_t(time.time())}")
18041804
1805-
async def fn_end(run_obj : Runnable):
1805+
async def fn_end(run_obj: Runnable):
18061806
print(f"on end callback starts at {format_t(time.time())}")
18071807
await asyncio.sleep(2)
18081808
print(f"on end callback ends at {format_t(time.time())}")

libs/core/langchain_core/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,4 +510,4 @@ def ensure_id(id_val: Optional[str]) -> str:
510510
Returns:
511511
A string ID, either the validated provided value or a newly generated UUID4.
512512
"""
513-
return id_val or str(f"{LC_AUTO_PREFIX}{uuid4()}")
513+
return id_val or f"{LC_AUTO_PREFIX}{uuid4()}"

libs/langchain/langchain_classic/_api/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
55
!!! warning
66
7-
This module and its submodules are for internal use only. Do not use them
8-
in your own code. We may change the API at any time with no warning.
7+
This module and its submodules are for internal use only. Do not use them in your
8+
own code. We may change the API at any time with no warning.
99
1010
"""
1111

libs/langchain/langchain_classic/chains/llm_summarization_checker/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
33
Chain that tries to verify the accuracy of text generation by splitting it into a
44
list of facts, then checking if those facts are true or not, and rewriting
5-
the text to make it more truth-ful. It will repeat this loop until it hits `max_tries`
6-
or gets to a "true" output.
5+
the text to make it more truthful. It will repeat this loop until it hits `max_tries` or
6+
gets to a "true" output.
77
"""

0 commit comments

Comments
 (0)