X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/085efac037c07ef299edbf48a4d871f17b296743..e7ddf524b056d2bc42ee6b2b5c3314e0dd5d95fb:/src/black/__init__.py?ds=sidebyside diff --git a/src/black/__init__.py b/src/black/__init__.py index 1923c06..e2376c4 100644 --- a/src/black/__init__.py +++ b/src/black/__init__.py @@ -177,8 +177,8 @@ def validate_regex( ) -> Optional[Pattern[str]]: try: return re_compile_maybe_verbose(value) if value is not None else None - except re.error: - raise click.BadParameter("Not a valid regular expression") from None + except re.error as e: + raise click.BadParameter(f"Not a valid regular expression: {e}") from None @click.command(