FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

shlex.quote: Move comment above `if` statement · python/cpython@a030aa4 · GitHub

Repository navigation

Commit a030aa4

Browse files
committed
shlex.quote: Move comment above if statement
1 parent e922280 commit a030aa4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎Lib/shlex.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,10 @@ def quote(s, *, force=False):
333333
safe_chars = (b'%+,-./0123456789:=@'
334334
b'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'
335335
b'abcdefghijklmnopqrstuvwxyz')
336+
# No quoting is needed if we are not forcing quoting
337+
# and `s` is an ASCII string consisting only of `safe_chars`.
336338
if (not force
337339
and s.isascii() and not s.encode().translate(None, delete=safe_chars)):
338-
# No quoting is needed if we are not forcing quoting
339-
# and `s` is an ASCII string consisting only of `safe_chars`.
340340
return s
341341

342342
# use single quotes, and put single quotes into double quotes

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL