static code analysis: make it pass flake8 3.7.4 (!1748)

Test with flake8: *.py
./test/check_checksums.py:13:13: E117 over-indented
./pmb/config/init.py:97:8: F632 use ==/!= to compare str, bytes, and int literals
./pmb/parse/arguments.py:229:13: E117 over-indented
This commit is contained in:
Robert Yang 2019-02-02 17:30:49 -05:00
parent 6b4fd9b911
commit 67254b62c4
3 changed files with 4 additions and 4 deletions

View File

@ -94,7 +94,7 @@ def ask_for_keymaps(args, device):
options = info["keymaps"].split(' ')
logging.info("Available keymaps for device (" + str(len(options)) +
"): " + ", ".join(options))
if args.keymap is "":
if args.keymap == "":
args.keymap = options[0]
while True:

View File

@ -226,7 +226,7 @@ def arguments_kconfig(subparser):
check.add_argument("--arch", choices=arch_choices, dest="arch")
check_package = check.add_argument("package", default="", nargs='?')
if argcomplete:
check_package.completer = kernel_completer
check_package.completer = kernel_completer
# "pmbootstrap kconfig edit"
edit = sub.add_parser("edit", help="edit kernel aport config")

View File

@ -10,8 +10,8 @@ def get_changed_files():
raw = subprocess.check_output(['git', 'diff', '--name-only',
'master...{}'.format(branch)])
except (KeyError, subprocess.CalledProcessError):
raw = subprocess.check_output(['git', 'diff', '--name-only',
'HEAD~1'])
raw = subprocess.check_output(['git', 'diff', '--name-only',
'HEAD~1'])
return raw.decode().splitlines()