def check_function_signature(self, node: AnyFunctionDefAndLambda) -> None:
     for arg in functions.get_all_arguments(node):
         is_first_argument = (
             functions.is_first_argument(node, arg.arg) and
             not isinstance(node, ast.Lambda)
         )
         self.check_name(
             arg, arg.arg, is_first_argument=is_first_argument,
         )
示例#2
0
    def check_function_signature(self, node: AnyFunctionDefAndLambda) -> None:
        arguments = functions.get_all_arguments(node)
        is_lambda = isinstance(node, ast.Lambda)
        for arg in arguments:
            should_check_argument = functions.is_first_argument(
                node,
                arg.arg,
            ) and not is_lambda

            self.check_name(
                arg,
                arg.arg,
                is_first_argument=should_check_argument,
            )