Skip to content

Commit cedb74c

Browse files
committed
DEPRECATED: add warning to deprecate nameof in the future
1 parent ef2179c commit cedb74c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

varname/core.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,11 @@ def nameof(
291291
VarnameRetrievingError: When the callee's node cannot be retrieved or
292292
trying to retrieve the full name of non attribute series calls.
293293
"""
294+
warnings.warn(
295+
"`nameof` is deprecated and will be removed in the future. "
296+
"Please use `argname` instead.",
297+
DeprecationWarning,
298+
)
294299
# Frame is anyway used in get_node
295300
frameobj = IgnoreList.create(
296301
ignore_lambda=False,

0 commit comments

Comments
 (0)