From 5e86a9503224e9447aab71feaae8b25b4cf0751c Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Thu, 25 Jul 2013 09:22:49 +0200 Subject: [PATCH] Some codestyle updates in babel.plural --- babel/plural.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/babel/plural.py b/babel/plural.py index 6f160538..144a0dc0 100644 --- a/babel/plural.py +++ b/babel/plural.py @@ -11,9 +11,6 @@ import re -__all__ = ['PluralRule', 'RuleError', 'to_gettext', 'to_javascript', - 'to_python'] - _plural_tags = ('zero', 'one', 'two', 'few', 'many', 'other') _fallback_tag = 'other' @@ -74,8 +71,7 @@ class PluralRule(object): are a `PluralRule` object, that object is returned. :param rules: the rules as list or dict, or a `PluralRule` object - :return: a corresponding `PluralRule` object - :raise Ruleerror: if the expression is malformed + :raise RuleError: if the expression is malformed """ if isinstance(rules, cls): return rules @@ -122,7 +118,6 @@ def to_javascript(rule): big performance hit for these simple calculations. :param rule: the rules as list or dict, or a `PluralRule` object - :return: a corresponding JavaScript function as `str` :raise RuleError: if the expression is malformed """ to_js = _JavaScriptCompiler().compile @@ -150,7 +145,6 @@ def to_python(rule): 'few' :param rule: the rules as list or dict, or a `PluralRule` object - :return: a corresponding Python function :raise RuleError: if the expression is malformed """ namespace = { @@ -178,7 +172,6 @@ def to_gettext(rule): 'nplurals=3; plural=((n == 1) ? 0 : (n == 2) ? 1 : 2)' :param rule: the rules as list or dict, or a `PluralRule` object - :return: an equivalent gettext-style plural expression :raise RuleError: if the expression is malformed """ rule = PluralRule.parse(rule) -- 2.47.2