Merge pull request #30182 from hbina/pylint_anomalous_backlash

"Anomalous backslash in string: '-'" in extract.py
This commit is contained in:
Rémi Verschelde 2019-06-29 18:15:46 +02:00 committed by GitHub
commit 5cf51cc7e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,7 +116,7 @@ shutil.move("editor.pot", "editor/translations/editor.pot")
# TODO: Make that in a portable way, if we care; if not, kudos to Unix users # TODO: Make that in a portable way, if we care; if not, kudos to Unix users
if (os.name == "posix"): if (os.name == "posix"):
added = subprocess.check_output("git diff editor/translations/editor.pot | grep \+msgid | wc -l", shell=True) added = subprocess.check_output(r"git diff editor/translations/editor.pot | grep \+msgid | wc -l", shell=True)
removed = subprocess.check_output("git diff editor/translations/editor.pot | grep \\\-msgid | wc -l", shell=True) removed = subprocess.check_output(r"git diff editor/translations/editor.pot | grep \\\-msgid | wc -l", shell=True)
print("\n# Template changes compared to the staged status:") print("\n# Template changes compared to the staged status:")
print("# Additions: %s msgids.\n# Deletions: %s msgids." % (int(added), int(removed))) print("# Additions: %s msgids.\n# Deletions: %s msgids." % (int(added), int(removed)))