Lines Matching defs:fail

102 def warn_or_fail(fail=False, *args, filename=None, line_number=None):
105 if fail:
121 if fail:
128 def fail(*args, filename=None, line_number=None):
163 fail("Illegal C identifier: {}".format(s))
214 fail("Text found after {" + name + "} block marker! It must be on a line by itself.")
216 fail("Non-whitespace characters found before {" + name + "} block marker! It must be on a line by itself.")
428 fail("{} {} must contain {{{}}} exactly once!".format(
431 fail("{} {} must not contain {{{}}}!".format(
609 self.cpp.fail = fail
619 fail("You may specify at most one function per block.\nFound a block containing at least two:\n\t" + repr(function) + " and " + repr(o))
669 fail("Too many var args")
1359 fail("You cannot use optional groups ('[' and ']')\nunless all parameters are positional-only ('/').")
1648 fail(f"Garbage after stop line: {remainder!r}")
1653 fail(f"Whitespace is not allowed before the stop line: {line!r}")
1696 fail("Mangled Argument Clinic marker line: {!r}".format(line))
1709 fail("Checksum mismatch!\nExpected: {}\nComputed: {}\n"
1815 fail("Invalid destination type " + repr(type) + " for " + name + " , must be " + ', '.join(valid_types))
1818 fail("Not enough arguments for destination " + name + " new " + type)
1820 fail("Too many arguments for destination " + name + " new " + type)
1844 fail("Can't clear destination" + self.name + " , it's not of type buffer")
1957 fail("Custom printers are broken right now")
2021 fail("Destination already exists: " + repr(name))
2027 fail("Destination does not exist: " + repr(name))
2047 fail('Exception raised during parsing:\n' +
2077 fail("Can't write to destination {}, "
2085 fail("Modified destination file " + repr(destination.filename) + ", not overwriting!")
2138 fail('Parent class or module ' + '.'.join(so_far) + " does not exist.")
2150 fail("Can't extract file type for file " + repr(filename))
2155 fail("Can't identify file type for file " + repr(filename))
2449 fail("Stepped on a land mine, trying to access attribute " + repr(name) + ":\n" + self.__message__)
2600 fail("{}: default value {!r} for field {} is not of type {}".format(
2610 fail("The 'annotation' parameter is not currently permitted.")
2615 # so after this change we will noisily fail.
2870 fail("bool_converter: illegal 'accept' argument " + repr(accept))
2920 fail("char_converter: illegal default value " + repr(self.default))
3057 fail("int_converter: illegal 'accept' argument " + repr(accept))
3197 fail("Py_ssize_t_converter: illegal 'accept' argument " + repr(accept))
3227 fail("slice_index_converter: illegal 'accept' argument " + repr(accept))
3327 fail("object: Cannot pass in both 'converter' and 'subclass_of'")
3365 fail("str_converter: illegal combination of arguments", key)
3371 fail("str_converter: Argument Clinic doesn't support default values for encoded strings")
3550 fail("Py_UNICODE_converter: illegal 'accept' argument " + repr(accept))
3611 fail("The only legal default value for Py_buffer is None.")
3624 fail("Py_buffer_converter: illegal combination of arguments")
3972 fail('IndentStack expected indents, but none are defined.')
3979 fail('Tab characters are illegal in the Argument Clinic DSL.')
4011 fail("Illegal outdent.")
4041 fail('Cannot dedent, line does not start with the previous margin:')
4081 fail("Insufficient Clinic version!\n Version: " + version + "\n Required: " + required)
4088 fail("Can't nest a module inside a class!")
4091 fail("Already defined module " + repr(name) + "!")
4107 fail("Already defined class " + repr(name) + "!")
4115 fail("unknown variable", repr(name))
4131 fail("unknown destination command", repr(command))
4140 fail("Unknown preset " + repr(destination) + "!")
4150 fail("Can't 'output pop', stack is empty!")
4169 fail("Invalid command / destination name " + repr(command_or_name) + ", must be one of:\n preset push pop print everything " + " ".join(fd))
4181 fail("Can't have preserve twice in one block!")
4186 fail("Can't set @classmethod, function is not a normal callable")
4191 fail("Can't set @staticmethod, function is not a normal callable")
4196 fail("Called @coexist twice!")
4208 fail('Tab characters are illegal in the Clinic DSL.\n\t' + repr(line), line_number=block_start)
4218 fail("'preserve' only works for blocks that don't produce any output!")
4257 fail(str(e))
4307 fail("Couldn't find existing function " + repr(existing) + "!")
4314 fail("'kind' of function and cloned function don't match! (@classmethod/@staticmethod/@coexist)")
4329 fail("Illegal function name: {}".format(full_name))
4331 fail("Illegal C basename: {}".format(c_basename))
4342 fail("Badly-formed annotation for " + full_name + ": " + returns)
4346 fail("Legacy converter {!r} not allowed as a return converter"
4349 fail("No available return converter called " + repr(name))
4352 fail("Badly-formed annotation for " + full_name + ": " + returns)
4360 fail(f"{fields[-1]} is a special method and cannot be converted to Argument Clinic! (Yet.)")
4364 fail("__new__ must be a class method!")
4368 fail("__init__ must be a normal method, not a class or static method!")
4377 fail("Undefined module used in declaration of " + repr(full_name.strip()) + ".")
4523 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".a)")
4533 fail("Invalid 'as' clause!")
4561 fail("Function " + self.function.name + " has an invalid parameter declaration:\n\t" + line)
4566 fail("Function " + self.function.name + " has an invalid parameter declaration (comma?):\n\t" + line)
4568 fail("Function " + self.function.name + " has an invalid parameter declaration (default value?):\n\t" + line)
4570 fail("Function " + self.function.name + " has an invalid parameter declaration (**kwargs?):\n\t" + line)
4584 fail("Can't have a parameter without a default (" + repr(parameter_name) + ")\nafter a parameter with a default!")
4591 fail("You can't specify py_default without specifying a default value!")
4594 fail("Vararg can't take a default value!")
4639 fail("'unspecified' is not a legal default value!")
4643 fail("Malformed expression given as default value\n"
4646 fail("Unsupported expression as default value: " + repr(default))
4663 fail("When you specify an expression (" + repr(default) + ") as your default value,\nyou MUST specify a valid c_default." + ast.dump(expr))
4673 fail("Unsupported default value " + repr(default) + " (looked like a Python constant)")
4679 fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
4696 fail("Syntax error: " + repr(e.text))
4702 fail("When you specify a named constant (" + repr(py_default) + ") as your default value,\nyou MUST specify a valid c_default.")
4710 fail('{} is not a valid {}converter'.format(name, legacy_str))
4725 fail("A 'self' parameter cannot be marked optional.")
4727 fail("A 'self' parameter cannot have a default value.")
4729 fail("A 'self' parameter cannot be in an optional group.")
4734 fail("A 'self' parameter, if specified, must be the very first thing in the parameter block.")
4740 fail("A 'defining_class' parameter cannot be marked optional.")
4742 fail("A 'defining_class' parameter cannot have a default value.")
4744 fail("A 'defining_class' parameter cannot be in an optional group.")
4746 fail("A 'defining_class' parameter, if specified, must either be the first thing in the parameter block, or come just after 'self'.")
4753 fail("You can't have two parameters named " + repr(parameter_name) + "!")
4755 fail(f"Parameter '{parameter_name}' requires a custom C name")
4773 fail("Annotations must be either a name, a function call, or a string.")
4784 fail("Function " + self.function.name + " uses '*' more than once.")
4792 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".b)")
4797 fail("Function " + self.function.name + " has a ] without a matching [.")
4799 fail("Function " + self.function.name + " has an empty group.\nAll groups must contain at least one parameter.")
4806 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".c)")
4809 fail("Function " + self.function.name + " uses '/' more than once.")
4814 fail("Function " + self.function.name + " has an unsupported group configuration. (Unexpected state " + str(self.parameter_state) + ".d)")
4816 fail("Function " + self.function.name + " mixes keyword-only and positional-only parameters, which is unsupported.")
4822 fail("Function " + self.function.name + " mixes keyword-only and positional-only parameters, which is unsupported.")
4863 fail("Function " + self.function.name + " has a ] without a matching [.")
5098 fail("Docstring for " + f.full_name + " does not have a summary line!\n" +
5109 fail('You may not specify {parameters} more than once in a docstring!')
5145 fail("Function " + self.function.name + " specifies '*' without any parameters afterwards.")