mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-01-23 01:10:04 -06:00
11 lines
306 B
Python
11 lines
306 B
Python
import pipes
|
|
import sys
|
|
|
|
|
|
def make_meta_entry(modname):
|
|
"""the hook `entry` is passed through `shlex.split()` by the command
|
|
runner, so to prevent issues with spaces and backslashes (on Windows)
|
|
it must be quoted here.
|
|
"""
|
|
return '{} -m {}'.format(pipes.quote(sys.executable), modname)
|