Skip to content

Commit cce59d7

Browse files
author
Anthony Sottile
committed
shlex.split works in py27+
1 parent 3b888c9 commit cce59d7

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pre_commit/parse_shebang.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
import shlex
77
import string
88

9-
from pre_commit import five
10-
119

1210
printable = frozenset(string.printable)
1311

@@ -31,8 +29,7 @@ def parse_bytesio(bytesio):
3129
if c not in printable:
3230
return ()
3331

34-
# shlex.split is horribly broken in py26 on text strings
35-
cmd = tuple(shlex.split(five.n(first_line)))
32+
cmd = tuple(shlex.split(first_line))
3633
if cmd[0] == '/usr/bin/env':
3734
cmd = cmd[1:]
3835
return cmd

0 commit comments

Comments
 (0)