From: Armin Ronacher Date: Thu, 25 Jul 2013 07:25:48 +0000 (+0200) Subject: Some codestyle updates in babel.messages.catalog X-Git-Tag: 1.0~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d90962361611c8ccc30c93d2dbd56a30dfdb984;p=thirdparty%2Fbabel.git Some codestyle updates in babel.messages.catalog --- diff --git a/babel/messages/catalog.py b/babel/messages/catalog.py index e187acbd..501763b5 100644 --- a/babel/messages/catalog.py +++ b/babel/messages/catalog.py @@ -9,13 +9,14 @@ :license: BSD, see LICENSE for more details. """ +import re +import time + from cgi import parse_header from datetime import datetime, time as time_ from difflib import get_close_matches from email import message_from_string from copy import copy -import re -import time from babel import __version__ as VERSION from babel.core import Locale @@ -27,7 +28,6 @@ from babel._compat import string_types, number_types, PY2, cmp __all__ = ['Message', 'Catalog', 'TranslationError'] - PYTHON_FORMAT = re.compile(r'''(?x) \% (?:\(([\w]*)\))? @@ -572,9 +572,6 @@ class Catalog(object): """Return the message with the specified ID. :param id: the message ID - :return: the message with the specified ID, or `None` if no such - message is in the catalog - :rtype: `Message` """ return self.get(id) @@ -654,8 +651,6 @@ class Catalog(object): :param lineno: the line number on which the msgid line was found in the PO file, if any :param context: the message context - :return: the newly added message - :rtype: `Message` """ message = Message(id, string, list(locations), flags, auto_comments, user_comments, previous_id, lineno=lineno, @@ -682,9 +677,6 @@ class Catalog(object): :param id: the message ID :param context: the message context, or ``None`` for no context - :return: the message with the specified ID, or `None` if no such - message is in the catalog - :rtype: `Message` """ return self._messages.get(self._key_for(id, context))