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: |
a7e04ce1e4fb416a4dbb2c545d9f09ff |
User & Date: | olr on 2019-05-11 11:35:40 |
Other Links: | manifest | tags |
Context
2019-05-11
| ||
12:06 | [build] code cleaning (pylint) check-in: b508963a37 user: olr tags: trunk, build | |
11:35 | [build] code cleaning (pylint) check-in: a7e04ce1e4 user: olr tags: trunk, build | |
11:07 | [build] code cleaning (pylint) check-in: f335e01188 user: olr tags: trunk, build | |
Changes
Modified make.py from [59e4608258] to [47a1201999].
︙ | ︙ | |||
155 156 157 158 159 160 161 | for lLineOpt in lOpt: for sOpt in lLineOpt: hDst.write("# " + dOptData["dOptLabel"][sLang].get(sOpt, "[no label found]")[0] + "\n") hDst.write(sOpt + " = " + ("1" if dOptData["dOptServer"].get(sOpt, None) else "0") + "\n") hDst.write("html = 1\n") | | | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 | for lLineOpt in lOpt: for sOpt in lLineOpt: hDst.write("# " + dOptData["dOptLabel"][sLang].get(sOpt, "[no label found]")[0] + "\n") hDst.write(sOpt + " = " + ("1" if dOptData["dOptServer"].get(sOpt, None) else "0") + "\n") hDst.write("html = 1\n") def createPackageZip (dVars, spLangPack): "create server zip" spfZip = "_build/" + dVars['name'] + "-"+ dVars['lang'] +"-v" + dVars['version'] + '.zip' hZip = zipfile.ZipFile(spfZip, mode='w', compression=zipfile.ZIP_DEFLATED) copyGrammalectePyPackageInZipFile(hZip, spLangPack) for spf in ["grammalecte-cli.py", "grammalecte-server.py", \ "README.txt", "LICENSE.txt", "LICENSE.fr.txt"]: hZip.write(spf) |
︙ | ︙ | |||
193 194 195 196 197 198 199 | #### READ CONFIGURATION print("> read configuration...") spLang = "gc_lang/" + sLang dVars = xConfig._sections['args'] dVars['locales'] = dVars["locales"].replace("_", "-") | | | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | #### READ CONFIGURATION print("> read configuration...") spLang = "gc_lang/" + sLang dVars = xConfig._sections['args'] dVars['locales'] = dVars["locales"].replace("_", "-") dVars['loc'] = str({ s: [s[0:2], s[3:5], ""] for s in dVars["locales"].split(" ") }) ## COMPILE RULES dResult = compile_rules.make(spLang, dVars['lang'], bUseCache) dVars.update(dResult) ## READ GRAMMAR CHECKER PLUGINS print("PYTHON:") |
︙ | ︙ | |||
238 239 240 241 242 243 244 | with open("grammalecte/"+sLang+"/gc_test.txt", "w", encoding="utf-8", newline="\n") as hDstPy: hDstPy.write("# TESTS FOR LANG [" + sLang + "]\n\n") hDstPy.write(dVars['gctests']) hDstPy.write("\n") createOXT(spLang, dVars, xConfig._sections['oxt'], spLangPack, bInstallOXT) | | | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 | with open("grammalecte/"+sLang+"/gc_test.txt", "w", encoding="utf-8", newline="\n") as hDstPy: hDstPy.write("# TESTS FOR LANG [" + sLang + "]\n\n") hDstPy.write(dVars['gctests']) hDstPy.write("\n") createOXT(spLang, dVars, xConfig._sections['oxt'], spLangPack, bInstallOXT) createPackageZip(dVars, spLangPack) #### JAVASCRIPT if bJavaScript: print("JAVASCRIPT:") print("+ Plugins: ", end="") sCodePlugins = "" for sf in os.listdir(spLang+"/modules-js"): |
︙ | ︙ | |||
447 448 449 450 451 452 453 | if xArgs.tests: xTestSuite = unittest.TestLoader().loadTestsFromModule(tests) unittest.TextTestRunner().run(xTestSuite) if xArgs.perf or xArgs.perf_memo: hDst = open("./gc_lang/"+sLang+"/perf_memo.txt", "a", encoding="utf-8", newline="\n") if xArgs.perf_memo else None tests.perf(sVersion, hDst) | < < < < < < | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 | if xArgs.tests: xTestSuite = unittest.TestLoader().loadTestsFromModule(tests) unittest.TextTestRunner().run(xTestSuite) if xArgs.perf or xArgs.perf_memo: hDst = open("./gc_lang/"+sLang+"/perf_memo.txt", "a", encoding="utf-8", newline="\n") if xArgs.perf_memo else None tests.perf(sVersion, hDst) if xArgs.web_ext or xArgs.firefox: with helpers.CD("_build/webext/"+sLang): if xArgs.lint_web_ext: os.system(r'web-ext lint -o text') if xArgs.firefox: # Firefox Developper edition spfFirefox = dVars['win_fx_dev_path'] if platform.system() == "Windows" else dVars['linux_fx_dev_path'] |
︙ | ︙ |