1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Refs #33476 -- Reformatted code with Black.

This commit is contained in:
django-bot
2022-02-03 20:24:19 +01:00
committed by Mariusz Felisiak
parent f68fa8b45d
commit 9c19aff7c7
1992 changed files with 139577 additions and 96284 deletions

View File

@@ -31,7 +31,7 @@ import re
import sys
proj_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.abspath(os.path.join(proj_dir, '..', '..', '..')))
sys.path.append(os.path.abspath(os.path.join(proj_dir, "..", "..", "..")))
def update_translation_catalogs():
@@ -41,16 +41,16 @@ def update_translation_catalogs():
prev_cwd = os.getcwd()
os.chdir(proj_dir)
call_command('makemessages')
call_command('compilemessages')
call_command("makemessages")
call_command("compilemessages")
# keep the diff friendly - remove 'POT-Creation-Date'
pofile = os.path.join(proj_dir, 'locale', 'fr', 'LC_MESSAGES', 'django.po')
pofile = os.path.join(proj_dir, "locale", "fr", "LC_MESSAGES", "django.po")
with open(pofile) as f:
content = f.read()
content = re.sub(r'^"POT-Creation-Date.+$\s', '', content, flags=re.MULTILINE)
with open(pofile, 'w') as f:
content = re.sub(r'^"POT-Creation-Date.+$\s', "", content, flags=re.MULTILINE)
with open(pofile, "w") as f:
f.write(content)
os.chdir(prev_cwd)