mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
fix PEP8 "E201 whitespace after '(' or '[' or '{'"
This commit is contained in:
parent
998011d535
commit
4af2e0004f
4 changed files with 34 additions and 34 deletions
|
|
@ -53,7 +53,7 @@ def get_default_config():
|
|||
'Summary': 50,
|
||||
'Description': 1500
|
||||
},
|
||||
'keyaliases': { },
|
||||
'keyaliases': {},
|
||||
}
|
||||
|
||||
def read_config(opts, config_file='config.py'):
|
||||
|
|
@ -709,7 +709,7 @@ def retrieve_string(app_dir, string, xmlfiles=None):
|
|||
# Return list of existing files that will be used to find the highest vercode
|
||||
def manifest_paths(app_dir, flavour):
|
||||
|
||||
possible_manifests = [ os.path.join(app_dir, 'AndroidManifest.xml'),
|
||||
possible_manifests = [os.path.join(app_dir, 'AndroidManifest.xml'),
|
||||
os.path.join(app_dir, 'src', 'main', 'AndroidManifest.xml'),
|
||||
os.path.join(app_dir, 'src', 'AndroidManifest.xml'),
|
||||
os.path.join(app_dir, 'build.gradle') ]
|
||||
|
|
@ -1040,9 +1040,9 @@ def prepare_source(vcs, app, build, build_dir, srclib_dir, extlib_dir, onserver=
|
|||
srclibpaths.append(basesrclib)
|
||||
|
||||
# Update the local.properties file
|
||||
localprops = [ os.path.join(build_dir, 'local.properties') ]
|
||||
localprops = [os.path.join(build_dir, 'local.properties') ]
|
||||
if 'subdir' in build:
|
||||
localprops += [ os.path.join(root_dir, 'local.properties') ]
|
||||
localprops += [os.path.join(root_dir, 'local.properties') ]
|
||||
for path in localprops:
|
||||
if not os.path.isfile(path):
|
||||
continue
|
||||
|
|
@ -1364,7 +1364,7 @@ class KnownApks:
|
|||
self.path = os.path.join('stats', 'known_apks.txt')
|
||||
self.apks = {}
|
||||
if os.path.exists(self.path):
|
||||
for line in file( self.path):
|
||||
for line in file(self.path):
|
||||
t = line.rstrip().split(' ')
|
||||
if len(t) == 2:
|
||||
self.apks[t[0]] = (t[1], None)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ def main():
|
|||
if args:
|
||||
|
||||
vercodes = common.read_pkg_args(args, True)
|
||||
apks = { appid: None for appid in vercodes }
|
||||
apks = {appid: None for appid in vercodes }
|
||||
|
||||
# Get the signed apk with the highest vercode
|
||||
for apkfile in sorted(glob.glob(os.path.join(output_dir, '*.apk'))):
|
||||
|
|
@ -86,7 +86,7 @@ def main():
|
|||
|
||||
else:
|
||||
|
||||
apks = { common.apknameinfo(apkfile)[0]: apkfile for apkfile in
|
||||
apks = {common.apknameinfo(apkfile)[0]: apkfile for apkfile in
|
||||
sorted(glob.glob(os.path.join(output_dir, '*.apk'))) }
|
||||
|
||||
for appid, apk in apks.iteritems():
|
||||
|
|
|
|||
|
|
@ -122,63 +122,63 @@ class FieldType():
|
|||
valuetypes = {
|
||||
'int': FieldType("Integer",
|
||||
r'^[1-9][0-9]*$', None,
|
||||
[ 'FlattrID' ],
|
||||
[ 'vercode' ]),
|
||||
['FlattrID' ],
|
||||
['vercode' ]),
|
||||
|
||||
'http': FieldType("HTTP link",
|
||||
r'^http[s]?://', None,
|
||||
[ "Web Site", "Source Code", "Issue Tracker", "Donate" ], []),
|
||||
["Web Site", "Source Code", "Issue Tracker", "Donate" ], []),
|
||||
|
||||
'bitcoin': FieldType("Bitcoin address",
|
||||
r'^[a-zA-Z0-9]{27,34}$', None,
|
||||
[ "Bitcoin" ],
|
||||
[ ]),
|
||||
["Bitcoin" ],
|
||||
[]),
|
||||
|
||||
'litecoin': FieldType("Litecoin address",
|
||||
r'^L[a-zA-Z0-9]{33}$', None,
|
||||
[ "Litecoin" ],
|
||||
[ ]),
|
||||
["Litecoin" ],
|
||||
[]),
|
||||
|
||||
'dogecoin': FieldType("Dogecoin address",
|
||||
r'^D[a-zA-Z0-9]{33}$', None,
|
||||
[ "Dogecoin" ],
|
||||
[ ]),
|
||||
["Dogecoin" ],
|
||||
[]),
|
||||
|
||||
'Bool': FieldType("Boolean",
|
||||
['Yes', 'No'], None,
|
||||
[ "Requires Root" ],
|
||||
[ ]),
|
||||
["Requires Root" ],
|
||||
[]),
|
||||
|
||||
'bool': FieldType("Boolean",
|
||||
['yes', 'no'], None,
|
||||
[ ],
|
||||
[ 'submodules', 'oldsdkloc', 'forceversion', 'forcevercode',
|
||||
[],
|
||||
['submodules', 'oldsdkloc', 'forceversion', 'forcevercode',
|
||||
'novcheck' ]),
|
||||
|
||||
'Repo Type': FieldType("Repo Type",
|
||||
[ 'git', 'git-svn', 'svn', 'hg', 'bzr', 'srclib' ], None,
|
||||
[ "Repo Type" ],
|
||||
[ ]),
|
||||
['git', 'git-svn', 'svn', 'hg', 'bzr', 'srclib' ], None,
|
||||
["Repo Type" ],
|
||||
[]),
|
||||
|
||||
'archive': FieldType("Archive Policy",
|
||||
r'^[0-9]+ versions$', None,
|
||||
[ "Archive Policy" ],
|
||||
[ ]),
|
||||
["Archive Policy" ],
|
||||
[]),
|
||||
|
||||
'antifeatures': FieldType("Anti-Feature",
|
||||
[ "Ads", "Tracking", "NonFreeNet", "NonFreeDep", "NonFreeAdd", "UpstreamNonFree" ], ',',
|
||||
[ "AntiFeatures" ],
|
||||
[ ]),
|
||||
["Ads", "Tracking", "NonFreeNet", "NonFreeDep", "NonFreeAdd", "UpstreamNonFree" ], ',',
|
||||
["AntiFeatures" ],
|
||||
[]),
|
||||
|
||||
'autoupdatemodes': FieldType("Auto Update Mode",
|
||||
r"^(Version .+|None)$", None,
|
||||
[ "Auto Update Mode" ],
|
||||
[ ]),
|
||||
["Auto Update Mode" ],
|
||||
[]),
|
||||
|
||||
'updatecheckmodes': FieldType("Update Check Mode",
|
||||
r"^(Tags|Tags .+|RepoManifest|RepoManifest/.+|RepoTrunk|HTTP|Static|None)$", None,
|
||||
[ "Update Check Mode" ],
|
||||
[ ])
|
||||
["Update Check Mode" ],
|
||||
[])
|
||||
}
|
||||
|
||||
# Check an app's metadata information for integrity errors
|
||||
|
|
@ -753,7 +753,7 @@ def write_metadata(dest, app):
|
|||
mf.write('\n')
|
||||
for build in app['builds']:
|
||||
writecomments('build:' + build['version'])
|
||||
mf.write("Build:%s,%s\n" % ( build['version'], build['vercode']))
|
||||
mf.write("Build:%s,%s\n" % (build['version'], build['vercode']))
|
||||
|
||||
def write_builditem(key, value):
|
||||
if key in ['version', 'vercode', 'origlines', 'type']:
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ def update_awsbucket(repo_section):
|
|||
if upload:
|
||||
if options.verbose:
|
||||
logging.info(' uploading "' + file_to_upload + '"...')
|
||||
extra = { 'acl': 'public-read' }
|
||||
extra = {'acl': 'public-read' }
|
||||
if file_to_upload.endswith('.sig'):
|
||||
extra['content_type'] = 'application/pgp-signature'
|
||||
elif file_to_upload.endswith('.asc'):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue