mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-03 17:50:11 +02:00
pylint: Reenable C0201 consider-iterating-dictionary
* C0201: Consider iterating the dictionary directly instead of calling .keys() (consider-iterating-dictionary)
This commit is contained in:
parent
a4c1ca48ad
commit
9749b26baa
@ -134,7 +134,7 @@ def main():
|
|||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
command = sys.argv[1]
|
command = sys.argv[1]
|
||||||
if command not in COMMANDS and command not in available_plugins.keys():
|
if command not in COMMANDS and command not in available_plugins:
|
||||||
if command in ('-h', '--help'):
|
if command in ('-h', '--help'):
|
||||||
print_help(available_plugins=available_plugins)
|
print_help(available_plugins=available_plugins)
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
@ -504,8 +504,8 @@ def parse_yaml_srclib(metadatapath):
|
|||||||
cause=e)
|
cause=e)
|
||||||
return thisinfo
|
return thisinfo
|
||||||
|
|
||||||
for key in data.keys():
|
for key in data:
|
||||||
if key not in thisinfo.keys():
|
if key not in thisinfo:
|
||||||
_warn_or_exception(_("Invalid srclib metadata: unknown key "
|
_warn_or_exception(_("Invalid srclib metadata: unknown key "
|
||||||
"'{key}' in '{file}'")
|
"'{key}' in '{file}'")
|
||||||
.format(key=key, file=metadatapath))
|
.format(key=key, file=metadatapath))
|
||||||
|
@ -312,7 +312,7 @@ def main():
|
|||||||
version=config['basebox_version']))
|
version=config['basebox_version']))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# verify box
|
# verify box
|
||||||
if config['basebox_version'] not in BASEBOX_CHECKSUMS.keys():
|
if config['basebox_version'] not in BASEBOX_CHECKSUMS:
|
||||||
logging.critical("can not verify '{box}', "
|
logging.critical("can not verify '{box}', "
|
||||||
"unknown basebox version '{version}'"
|
"unknown basebox version '{version}'"
|
||||||
.format(box=config['basebox'],
|
.format(box=config['basebox'],
|
||||||
|
@ -61,7 +61,6 @@ confidence = ["HIGH", "INFERENCE"]
|
|||||||
disable = [
|
disable = [
|
||||||
"broad-exception-caught",
|
"broad-exception-caught",
|
||||||
"broad-exception-raised",
|
"broad-exception-raised",
|
||||||
"consider-iterating-dictionary",
|
|
||||||
"invalid-name",
|
"invalid-name",
|
||||||
"missing-class-docstring",
|
"missing-class-docstring",
|
||||||
"missing-function-docstring",
|
"missing-function-docstring",
|
||||||
|
Loading…
Reference in New Issue
Block a user