Skip to content

Commit a82b8e3

Browse files
committed
[API-Compat] Fixed decorator str input
1 parent 8a7f9b3 commit a82b8e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

python/paddle/utils/compat_kwarg_check.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ def forbid_keywords(
3131
illegal_keys: list[str] | str - Forbidden keyword names
3232
correct_func_name: str - Recommended function name
3333
"""
34-
keys = [illegal_keys] if isinstance(illegal_keys, str) else illegal_keys
34+
illegal_keys = (
35+
[illegal_keys] if isinstance(illegal_keys, str) else illegal_keys
36+
)
3537

3638
def decorator(func: F) -> F:
3739
orig_sig = inspect.signature(func)

0 commit comments

Comments
 (0)