Grammalecte  Check-in [1e6121ef2b]

Overview
Comment:[build] code cleaning (pylint)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | build
Files: files | file ages | folders
SHA3-256: 1e6121ef2bca581aed4be3f280c19558f55b5ddea3c006d8e4cf00dfa9c796ae
User & Date: olr on 2019-05-11 12:52:46
Other Links: manifest | tags
Context
2019-05-11
12:56
[build] code cleaning (pylint) check-in: 0f67f597ce user: olr tags: trunk, build
12:52
[build] code cleaning (pylint) check-in: 1e6121ef2b user: olr tags: trunk, build
12:47
[build] code cleaning (pylint) check-in: 1d0bea98d6 user: olr tags: trunk, build
Changes

Modified compile_rules_js_convert.py from [22836fa3f3] to [401f517e6b].

162
163
164
165
166
167
168

169
170
171
172
173
    if not sGroupsPositioningCode:
        return None
    return [ int(sCode)  if sCode.isdigit() or (sCode[0:1] == "-" and sCode[1:].isdigit())  else sCode \
             for sCode in sGroupsPositioningCode.split(",") ]


def pyActionsToString (dActions):

    for sKey, aValue in dActions.items():
        if aValue[2] == "-":
            aValue[3] = aValue[3].replace(" ", " ") # nbsp --> nnbsp
            aValue[10] = aValue[10].replace("« ", "« ").replace(" »", " »").replace(" :", " :").replace(" :", " :")
    return str(dActions).replace("True", "true").replace("False", "false");







>
|



|
162
163
164
165
166
167
168
169
170
171
172
173
174
    if not sGroupsPositioningCode:
        return None
    return [ int(sCode)  if sCode.isdigit() or (sCode[0:1] == "-" and sCode[1:].isdigit())  else sCode \
             for sCode in sGroupsPositioningCode.split(",") ]


def pyActionsToString (dActions):
    "returns dictionary as string (nbsp -> nnbsp, True -> true, etc.)"
    for _, aValue in dActions.items():
        if aValue[2] == "-":
            aValue[3] = aValue[3].replace(" ", " ") # nbsp --> nnbsp
            aValue[10] = aValue[10].replace("« ", "« ").replace(" »", " »").replace(" :", " :").replace(" :", " :")
    return str(dActions).replace("True", "true").replace("False", "false")