diff options
author | Aarni Koskela <akx@iki.fi> | 2023-01-18 20:27:44 +0200 |
---|---|---|
committer | Aarni Koskela <akx@iki.fi> | 2023-01-18 21:20:51 +0200 |
commit | 82d345a66e850f643607ac9fcafd9b9a2a89d1e1 (patch) | |
tree | ad66b7a13fb05f30628b6710dacab554505d55e8 /babel/messages/pofile.py | |
parent | cb0269fc63f5af4ade770f7a8872de8090bf697d (diff) | |
download | babel-82d345a66e850f643607ac9fcafd9b9a2a89d1e1.tar.gz |
Apply some small miscellaneous formatting fixes
Diffstat (limited to 'babel/messages/pofile.py')
-rw-r--r-- | babel/messages/pofile.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/babel/messages/pofile.py b/babel/messages/pofile.py index a9180a7..88cc043 100644 --- a/babel/messages/pofile.py +++ b/babel/messages/pofile.py @@ -134,7 +134,6 @@ class _NormalizedString: return self.__cmp__(other) != 0 - class PoFileParser: """Support class to read messages from a ``gettext`` PO (portable object) file and add them to a `Catalog` @@ -615,11 +614,13 @@ def write_po( locs.append(location) _write_comment(' '.join(locs), prefix=':') if message.flags: - _write('#%s\n' % ', '.join([''] + sorted(message.flags))) + _write(f"#{', '.join(['', *sorted(message.flags)])}\n") if message.previous_id and include_previous: - _write_comment('msgid %s' % _normalize(message.previous_id[0]), - prefix='|') + _write_comment( + f'msgid {_normalize(message.previous_id[0])}', + prefix='|', + ) if len(message.previous_id) > 1: _write_comment('msgid_plural %s' % _normalize( message.previous_id[1] |