mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-17 22:40:11 -06:00
Add pcre type.
This commit is contained in:
@@ -49,7 +49,10 @@ def clean_path_on_failure(path):
|
||||
raise
|
||||
|
||||
|
||||
# TODO: asottile.contextlib this with a forward port of nested
|
||||
@contextlib.contextmanager
|
||||
def noop_context():
|
||||
yield
|
||||
|
||||
|
||||
def shell_escape(arg):
|
||||
return "'" + arg.replace("'", "'\"'\"'".strip()) + "'"
|
||||
|
||||
Reference in New Issue
Block a user