From 58f176f77a8bf3f7139ad531c04050cce332a889 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Oct 23 2016 13:12:18 +0000 Subject: Mark lines as noqa to avoid pep8 E126 on EL7 These PEP-8 errors are caused by an extra indent for dict values. We would like to do indent these extra to indicate they are not just another key in the dict, but pep8 on EL7 does not accept this style, because it thinks that we are in a function definition. Let's just ignore these couple of lines for now. Signed-off-by: Patrick Uiterwijk Reviewed-by: Howard Johnson --- diff --git a/ipsilon/info/infosssd.py b/ipsilon/info/infosssd.py index 4dcbf60..d5b63d9 100644 --- a/ipsilon/info/infosssd.py +++ b/ipsilon/info/infosssd.py @@ -175,6 +175,7 @@ class Installer(InfoProviderInstaller): try: changes['domains'][domain] = { 'ldap_user_extra_attrs': + # noqa (pep8 E126) sssd_domain.get_option('ldap_user_extra_attrs')} except SSSDConfig.NoOptionError: pass @@ -263,7 +264,7 @@ class Installer(InfoProviderInstaller): sssd_domain.set_option('ldap_user_extra_attrs', changes['domains'][domain][ 'ldap_user_extra_attrs'].encode( - 'utf-8')) + 'utf-8')) else: sssd_domain.remove_option('ldap_user_extra_attrs') sssdconfig.save_domain(sssd_domain) diff --git a/ipsilon/login/authform.py b/ipsilon/login/authform.py index f0bfd31..7ae9a7b 100644 --- a/ipsilon/login/authform.py +++ b/ipsilon/login/authform.py @@ -13,7 +13,7 @@ import subprocess # other languages. PAM_AUTH_ERRORS = { "Authentication token is no longer valid; new one required": - "Password is expired", + "Password is expired", # noqa (pep8 126) "Authentication failure": "Authentication failure", } diff --git a/ipsilon/providers/openidc/auth.py b/ipsilon/providers/openidc/auth.py index ce70ae2..28e1dde 100644 --- a/ipsilon/providers/openidc/auth.py +++ b/ipsilon/providers/openidc/auth.py @@ -753,7 +753,7 @@ class OpenIDC(ProviderPageBase): 'userinfo_encryption_alg_values_supported': [], 'userinfo_encryption_enc_values_supported': [], 'request_object_signing_alg_values_supported': - jws_default_allowed_algs + ['none'], + jws_default_allowed_algs + ['none'], # noqa (pep8 E126) 'request_object_encryption_alg_values_supported': [], 'request_object_encryption_enc_values_supported': [], 'token_endpoint_auth_methods_supported': [ diff --git a/tests/testgssapi.py b/tests/testgssapi.py index 540dac6..63731f7 100755 --- a/tests/testgssapi.py +++ b/tests/testgssapi.py @@ -40,6 +40,7 @@ sp_g = {'HTTPDCONFD': '${TESTDIR}/${NAME}/conf.d', sp_a = {'hostname': '${ADDRESS}', 'saml_idp_metadata': + # noqa (pep8 E126) 'https://%s:45080/idp1/saml2/metadata' % WRAP_HOSTNAME, 'saml_auth': '/sp', 'httpd_user': '${TEST_USER}'}