0007-misc-fix-unidiomatic-typecheck-pylint-error-56982.patch
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 |
- |