mirror of
https://github.com/hwchase17/langchain.git
synced 2025-06-28 01:19:31 +00:00
core[patch]: deprecation docstring with lib (#18350)
This commit is contained in:
parent
bce0684327
commit
11cb42c2c1
@ -257,10 +257,12 @@ def deprecated(
|
||||
addendum,
|
||||
]
|
||||
details = " ".join([component.strip() for component in components if component])
|
||||
package = _name.split(".")[0].replace("_", "-") if "." in _name else None
|
||||
since_str = f"{package}=={since}" if package else since
|
||||
new_doc = (
|
||||
f"[*Deprecated*] {old_doc}\n"
|
||||
f"{notes_header if notes_header not in old_doc else ''}\n"
|
||||
f".. deprecated:: {since}\n"
|
||||
f".. deprecated:: {since_str}\n"
|
||||
f" {details}"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user