mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
Use constants for field/flag types
Avoids typos, such as one I just found which was 'strsng' isntead of 'string'. The static analyzer can catch those if they are constants. Comparing ints is also faster than strings, which adds up in readmeta.
This commit is contained in:
parent
992406de0e
commit
b1a9180d12
2 changed files with 47 additions and 37 deletions
|
|
@ -108,7 +108,7 @@ def check_regexes(app):
|
|||
for m, r in checks:
|
||||
v = app.get_field(f)
|
||||
t = metadata.metafieldtype(f)
|
||||
if t == 'multiline':
|
||||
if t == metadata.TYPE_MULTILINE:
|
||||
for l in v.splitlines():
|
||||
if m.match(l):
|
||||
yield "%s at line '%s': %s" % (f, l, r)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue