Mercurial > gnulib
changeset 39059:f6aa07d1cc45
module: simplify file table generation
author | Dmitry Selyutin <ghostmansd@gmail.com> |
---|---|
date | Sun, 22 Oct 2017 23:18:12 +0300 |
parents | 31639c8e63d4 |
children | e68acd5236e9 |
files | pygnulib/module.py |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/pygnulib/module.py Sun Oct 22 23:13:50 2017 +0300 +++ b/pygnulib/module.py Sun Oct 22 23:18:12 2017 +0300 @@ -387,10 +387,8 @@ class File(Base): """gnulib module text file""" - _TABLE = {} - for (_key, (_, _typeid, _value)) in Base._TABLE.items(): - _TABLE[_value] = (_typeid, _key) - _FIELDS = [field for (_, _, field) in Base._TABLE.values()] + _TABLE = {_value[2]:(_value[1], _key) for (_key, _value) in Base._TABLE.items()} + _FIELDS = [_field for (_, _, _field) in Base._TABLE.values()] _PATTERN = _re.compile("({}):".format("|".join(_FIELDS)))