From 77bb4b517769f7707514b0f7e3da5762ff0f1cc4 Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Mon, 28 Jan 2013 14:55:20 +0100 Subject: Pylint cleanup. Add more dynamic attribute info to IPATypeChecker in make-lint. Remove unnecessary pylint comments. Fix false positivies introduced by Pylint 0.26. https://fedorahosted.org/freeipa/ticket/3379 --- ipalib/parameters.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'ipalib/parameters.py') diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 670e03605..502f173c9 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -1101,8 +1101,7 @@ class Int(Number): ) def __init__(self, name, *rules, **kw): - #pylint: disable=E1003 - super(Number, self).__init__(name, *rules, **kw) + super(Int, self).__init__(name, *rules, **kw) if (self.minvalue > self.maxvalue) and (self.minvalue is not None and self.maxvalue is not None): raise ValueError( @@ -1257,7 +1256,6 @@ class Decimal(Number): ) def _enforce_numberclass(self, value): - #pylint: disable=E1101 numberclass = value.number_class() if numberclass not in self.numberclass: raise ValidationError(name=self.get_param_name(), @@ -1281,7 +1279,7 @@ class Decimal(Number): def _remove_exponent(self, value): assert type(value) is decimal.Decimal - if not self.exponential: #pylint: disable=E1101 + if not self.exponential: try: # adopted from http://docs.python.org/library/decimal.html value = value.quantize(decimal.Decimal(1)) \ @@ -1499,7 +1497,7 @@ class Str(Data): Do not allow leading/trailing spaces. """ assert type(value) is unicode - if self.noextrawhitespace is False: #pylint: disable=E1101 + if self.noextrawhitespace is False: return if len(value) != len(value.strip()): return _('Leading and trailing spaces are not allowed') -- cgit