Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-113317: Remove Argument Clinic global variable 'clinic'
* Add Clinic.warn() and Clinic.fail() methods. * Add filename parameter to BlockParser constructor. * Add BlockParser.fail() method. * Add DSLParser.fail() method. * Pass lineno parameter to DSLParser.format_docstring(): more accurate error reporting. * Convert a few DSLParser static methods to regular method to be able to call self.fail(). * Language.render() clinic parameter is now required: None is no longer accepted. * Remove warn() function. * Remove global variable 'clinic'. fail() and warn() methods get filename and line number from the instance on which the method is called, rather than relying on a global variable 'clinic'.
- Loading branch information