Projet

Général

Profil

0007-misc-fix-unidiomatic-typecheck-pylint-error-56982.patch

Valentin Deniaud, 21 septembre 2021 17:09

Télécharger (1,46 ko)

Voir les différences:

Subject: [PATCH 07/59] misc: fix unidiomatic-typecheck pylint error (#56982)

 src/authentic2/idp/saml/saml2_endpoints.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
src/authentic2/idp/saml/saml2_endpoints.py
377 377
            # Only name/values or name/format/values
378 378
            name = None
379 379
            values = None
380
            if type(key) is tuple and len(key) == 2:
380
            if isinstance(key, tuple) and len(key) == 2:
381 381
                name, format = key
382 382
                attribute.nameFormat = format
383 383
                values = attributes[(name, format)]
384
            elif type(key) is tuple and len(key) == 3:
384
            elif isinstance(key, tuple) and len(key) == 3:
385 385
                name, format, nickname = key
386 386
                attribute.nameFormat = format
387 387
                attribute.friendlyName = nickname
388 388
                values = attributes[(name, format, nickname)]
389
            elif type(key) is tuple:
389
            elif isinstance(key, tuple):
390 390
                return
391 391
            else:
392 392
                name = key
393
-