]> arthur.barton.de Git - bup.git/commitdiff
pylint: enable consider-using-in
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 27 Aug 2021 22:30:41 +0000 (00:30 +0200)
committerRob Browning <rlb@defaultvalue.org>
Fri, 17 Sep 2021 16:27:45 +0000 (11:27 -0500)
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
.pylintrc
lib/bup/cmd/ftp.py
lib/bup/shquote.py

index 1b6370b8f765dfc15c2be8a952cf314f20cd2a32..f7c5f604a2a2fb6104ed7a323b672d16b9223880 100644 (file)
--- a/.pylintrc
+++ b/.pylintrc
@@ -3,6 +3,7 @@
 [MESSAGES CONTROL]
 disable=all
 enable=
+  consider-using-in,
   return-in-init,
   trailing-whitespace,
   unused-import,
index 33fd8046407b46636579971bd818071796405e59..4694dd95bc596484e30da2e26924b3e12c6cab55 100755 (executable)
@@ -226,7 +226,7 @@ def main(argv):
                                 with open(name, 'wb') as destfile:
                                     log('Saving %s\n' % path_msg(name))
                                     write_to_file(srcfile, destfile)
-            elif cmd == b'help' or cmd == b'?':
+            elif cmd in (b'help', b'?'):
                 out.write(b'Commands: ls cd pwd cat get mget help quit\n')
                 out.flush()
             elif cmd in (b'quit', b'exit', b'bye'):
index 829f3f3477e26225e1d460249965307eeaf7a1dd..ed070c5cba9e288c112ac80f71dbe31ce34345aa 100644 (file)
@@ -32,7 +32,7 @@ def _quotesplit(line):
             yield (wordstart, word)
             word = b''
             wordstart = i+1
-        elif not inquote and not word and (c == q or c == qq):
+        elif not inquote and not word and c in (q, qq):
             # the 'not word' constraint on this is un-sh-like, but do it
             # for sanity when autocompleting
             inquote = c