diff --git a/fdroidserver/common.py b/fdroidserver/common.py index bbb4fc47..5c9eff52 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -468,7 +468,7 @@ def read_config(opts=None): .format(key=k, configname=configname)) for configname in confignames_to_delete: - del(config[configname]) + del config[configname] return config @@ -3656,7 +3656,7 @@ def compare_apks(apk1, apk2, tmp_dir, log_dir=None): '--max-report-size', '12345678', '--max-diff-block-lines', '128', '--html', htmlfile, '--text', textfile, absapk1, absapk2]) != 0: - return("Failed to run diffoscope " + apk1) + return "Failed to run diffoscope " + apk1 apk1dir = os.path.join(tmp_dir, apk_badchars.sub('_', apk1[0:-4])) # trim .apk apk2dir = os.path.join(tmp_dir, apk_badchars.sub('_', apk2[0:-4])) # trim .apk @@ -3675,17 +3675,17 @@ def compare_apks(apk1, apk2, tmp_dir, log_dir=None): if set_command_in_config('apktool'): if subprocess.call([config['apktool'], 'd', absapk1, '--output', 'apktool'], cwd=apk1dir) != 0: - return("Failed to run apktool " + apk1) + return "Failed to run apktool " + apk1 if subprocess.call([config['apktool'], 'd', absapk2, '--output', 'apktool'], cwd=apk2dir) != 0: - return("Failed to run apktool " + apk2) + return "Failed to run apktool " + apk2 p = FDroidPopen(['diff', '-r', apk1dir, apk2dir], output=False) lines = p.output.splitlines() if len(lines) != 1 or 'META-INF' not in lines[0]: if set_command_in_config('meld'): p = FDroidPopen([config['meld'], apk1dir, apk2dir], output=False) - return("Unexpected diff output:\n" + p.output) + return "Unexpected diff output:\n" + p.output # since everything verifies, delete the comparison to keep cruft down shutil.rmtree(apk1dir) diff --git a/fdroidserver/index.py b/fdroidserver/index.py index 5536fe74..6599565b 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -1017,7 +1017,7 @@ def v1_sort_packages(packages, fdroid_signing_key_fingerprints): if package.get('versionCode', None): versionCode = -int(package['versionCode']) - return(packageName, group, signer, versionCode) + return packageName, group, signer, versionCode packages.sort(key=v1_sort_keys) diff --git a/fdroidserver/metadata.py b/fdroidserver/metadata.py index 72737d41..d69fb6f1 100644 --- a/fdroidserver/metadata.py +++ b/fdroidserver/metadata.py @@ -816,7 +816,7 @@ def parse_yaml_metadata(mf, app): "metadata because it is deprecated.") .format(field=deprecated_field, metapath=mf.name)) - del(yamldata[deprecated_field]) + del yamldata[deprecated_field] if yamldata.get('Builds', None): for build in yamldata.get('Builds', []): diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 32b6b55d..fe3a0874 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -751,9 +751,9 @@ def insert_funding_yml_donation_links(apps): app['OpenCollective'] = s if not app.get('Donate'): if 'liberapay' in data: - del(data['liberapay']) + del data['liberapay'] if 'open_collective' in data: - del(data['open_collective']) + del data['open_collective'] # this tuple provides a preference ordering for k in ('custom', 'github', 'patreon', 'community_bridge', 'ko_fi', 'issuehunt'): v = data.get(k) diff --git a/makebuildserver b/makebuildserver index b8926f95..428dec50 100755 --- a/makebuildserver +++ b/makebuildserver @@ -133,7 +133,7 @@ elif os.path.exists('makebs.config.py'): # this is the old name for the config file exec(compile(open('makebs.config.py').read(), 'makebs.config.py', 'exec'), config) if '__builtins__' in config: - del(config['__builtins__']) # added by compile/exec + del config['__builtins__'] # added by compile/exec logging.debug("makebuildserver.config.py parsed -> %s", json.dumps(config, indent=4, sort_keys=True)) if config['basebox'] == BASEBOX_DEFAULT and 'basebox_version' not in config: config['basebox_version'] = BASEBOX_VERSION_DEFAULT diff --git a/tests/update.TestCase b/tests/update.TestCase index 6428dce2..4c35bf86 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -319,7 +319,7 @@ class UpdateTest(unittest.TestCase): repoapps['info.guardianproject.urzip']['localized']['en-US']['name']) self.assertIsNone(repoapps['obb.mainpatch.current'].get('Name')) - del(repoapps['info.guardianproject.urzip']['localized']) + del repoapps['info.guardianproject.urzip']['localized'] fdroidserver.update.insert_missing_app_names_from_apks(repoapps, apks) self.assertEqual('urzip-πÇÇπÇÇ现代汉语通用字-български-عربي1234', repoapps['info.guardianproject.urzip']['localized']['en-US']['name'])