Skip to content

Commit 2e128d5

Browse files
committed
Tweak shlex.quote docs and doctring based on picnixz's review
1 parent f3756b0 commit 2e128d5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Doc/library/shlex.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ The :mod:`!shlex` module defines the following functions:
5050
string that can safely be used as one token in a shell command line, for
5151
cases where you cannot use a list.
5252

53-
If *force* is :const:`True` then *s* will be quoted even if it is already
54-
safe for a shell without being quoted.
53+
If *force* is :const:`True`, then *s* is unconditionally quoted,
54+
even if it is already safe for a shell without being quoted.
5555

5656
.. _shlex-quote-warning:
5757

Lib/shlex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ def join(split_command):
320320
def quote(s, *, force=False):
321321
"""Return a shell-escaped version of the string *s*.
322322
323-
If *force* is *True* then *s* will be quoted even if it is
324-
already safe for a shell without being quoted.
323+
If *force* is *True*, then *s* is unconditionally quoted,
324+
even if it is already safe for a shell without being quoted.
325325
"""
326326
if not s:
327327
return "''"

0 commit comments

Comments
 (0)