From 1bcc0d697dd37a9268641f0cbaa7e9e781552233 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 7 May 2015 12:33:40 -0400 Subject: pylint 1.4.3 version fixes Pylint 1.4.3 completely stopped recognizing the star-args condition. In order to avoid pylint error with > 1.4.3 stop caring for star-args and add cmdline option to ignore those errors completly so older pylint versions are happy too. Also fix type() vs isinstance() checks, isinstance is generally a more correct approach to check for classes. In some 'admin' files the type() -> isinstance() fix required to invert the order in which ComplexList and MappingList are checked as the latter is a subclass of ComplexList, so it needs to be checked first otherwise the check for isinstance(option, ComplexList) matches for both and the code stops functioning properly. Signed-off-by: Simo Sorce Reviewed-by: Rob Crittenden --- ipsilon/providers/openid/auth.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ipsilon/providers/openid/auth.py') diff --git a/ipsilon/providers/openid/auth.py b/ipsilon/providers/openid/auth.py index 2510ff4..e85890e 100644 --- a/ipsilon/providers/openid/auth.py +++ b/ipsilon/providers/openid/auth.py @@ -44,7 +44,7 @@ class AuthenticateRequest(ProviderPageBase): if args is not None: first = args[0] if len(args) > 0 else None second = first[0] if len(first) > 0 else None - if type(second) is dict: + if isinstance(second, dict): form = second.get('form', None) return form @@ -191,7 +191,6 @@ class AuthenticateRequest(ProviderPageBase): "authz_details": ad, } context.update(dict((self.trans.get_POST_tuple(),))) - # pylint: disable=star-args return self._template('openid/consent_form.html', **context) def _response(self, request, session): -- cgit