mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 06:33:41 +00:00
core[patch]: deprecation docstring with lib (#18350)
This commit is contained in:
committed by
William Fu-Hinthorn
parent
5c7a7f9246
commit
94c186c7d7
@@ -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}"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user