mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
core: throw error on invalid alternative_import in deprecated
This commit is contained in:
@@ -100,6 +100,16 @@ def deprecated(
|
||||
pass
|
||||
"""
|
||||
|
||||
if (
|
||||
alternative_import
|
||||
and "." not in alternative_import
|
||||
or " " in alternative_import
|
||||
):
|
||||
raise ValueError(
|
||||
"alternative_import must be a fully qualified module path, e.g. "
|
||||
"`package.module.Class`"
|
||||
)
|
||||
|
||||
def deprecate(
|
||||
obj: T,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user