Remove the rec argument from 'find_argname' as promised The `rec` parameter and `DEPRECATED_ARGUMENT_DEFAULT` sentinel were deprecated since astroid 3.1. Remove them now that we're on 4.2.
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py index 144f2f8..2e1e3a6 100644 --- a/astroid/nodes/node_classes.py +++ b/astroid/nodes/node_classes.py
@@ -597,9 +597,6 @@ return _infer_stmts(stmts, context, frame) -DEPRECATED_ARGUMENT_DEFAULT = "DEPRECATED_ARGUMENT_DEFAULT" - - class Arguments( _base_nodes.AssignTypeNode ): # pylint: disable=too-many-instance-attributes @@ -969,7 +966,7 @@ return True return self.find_argname(name)[1] is not None - def find_argname(self, argname, rec=DEPRECATED_ARGUMENT_DEFAULT): + def find_argname(self, argname): """Get the index and :class:`AssignName` node for given name. :param argname: The name of the argument to search for. @@ -978,12 +975,6 @@ :returns: The index and node for the argument. :rtype: tuple(str or None, AssignName or None) """ - if rec != DEPRECATED_ARGUMENT_DEFAULT: # pragma: no cover - warnings.warn( - "The rec argument will be removed in astroid 3.1.", - DeprecationWarning, - stacklevel=2, - ) if self.arguments: index, argument = _find_arg(argname, self.arguments) if argument: