Skip to content

Commit 0e722d6

Browse files
committed
shlex: Make force a keyword only argument in shlex.quote
There are propositions to add a single-quote-double-quote switch (gh-90630), so to avoid hiccups of people passing `force` as a positional and it being used for the single-double switch, we make kwargs kwargs-only.
1 parent ddbe3a5 commit 0e722d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/shlex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def join(split_command):
317317
return ' '.join(quote(arg) for arg in split_command)
318318

319319

320-
def quote(s, force=False):
320+
def quote(s, *, force=False):
321321
"""Return a shell-escaped version of the string *s*.
322322
323323
If *force* is *True* then *s* will be quoted even if it is

0 commit comments

Comments
 (0)