Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open warning with paddle.utils.deprecated #60458

Merged
merged 15 commits into from
Jan 2, 2024
Prev Previous commit
Next Next commit
fix
  • Loading branch information
ooooo-create committed Dec 29, 2023
commit b29825392bf9297320c8271747d98ffcb20f73ab
7 changes: 3 additions & 4 deletions test/legacy_test/test_deprecated_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,10 @@ def get_warning_index(api):
"""

doc_lst = api.__doc__.splitlines()
doc_iter = iter(doc_lst)
for idx, val in enumerate(doc_iter):
next_val = next(doc_iter, None)
for idx, val in enumerate(doc_lst):
next_val = doc_lst[idx + 1] if idx + 1 < len(doc_lst) else ""
if (
val == (" Warning:\n")
val == (" Warning:")
and next_val.endswith(" instead.")
and "and will be removed in future versions." in next_val
):
Expand Down