Grammalecte  Check-in [1e6121ef2b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

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 2019-05-11 12:52:46
Context
2019-05-11
12:56
[build] code cleaning (pylint) check-in: 0f67f597ce user: olr tags: build, trunk
12:52
[build] code cleaning (pylint) check-in: 1e6121ef2b user: olr tags: build, trunk
12:47
[build] code cleaning (pylint) check-in: 1d0bea98d6 user: olr tags: build, trunk
Changes

Changes to compile_rules_js_convert.py.

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")