root: fix linting errors
This commit is contained in:
parent
9330a03273
commit
e2804b9755
|
@ -10,7 +10,7 @@ import yaml
|
|||
from django.conf import ImproperlyConfigured
|
||||
from structlog import get_logger
|
||||
|
||||
SEARCH_PATHS = ["passbook/lib/default.yml", "/etc/passbook/config.yml", "",] + glob(
|
||||
SEARCH_PATHS = ["passbook/lib/default.yml", "/etc/passbook/config.yml", ""] + glob(
|
||||
"/etc/passbook/config.d/*.yml", recursive=True
|
||||
)
|
||||
LOGGER = get_logger()
|
||||
|
|
|
@ -133,7 +133,7 @@ class SAMLProvider(Provider):
|
|||
metadata = DescriptorDownloadView.get_metadata(request, self)
|
||||
return render_to_string(
|
||||
"saml/idp/admin_metadata_modal.html",
|
||||
{"provider": self, "metadata": metadata,},
|
||||
{"provider": self, "metadata": metadata},
|
||||
)
|
||||
except Provider.application.RelatedObjectDoesNotExist:
|
||||
return None
|
||||
|
|
|
@ -18,6 +18,7 @@ from passbook.providers.saml.utils.xml_render import get_assertion_xml, get_resp
|
|||
if TYPE_CHECKING:
|
||||
from passbook.providers.saml.models import SAMLProvider
|
||||
|
||||
|
||||
# pylint: disable=too-many-instance-attributes
|
||||
class Processor:
|
||||
"""Base SAML 2.0 AuthnRequest to Response Processor.
|
||||
|
|
|
@ -74,7 +74,7 @@ class AccessRequiredView(AccessMixin, View):
|
|||
return render(
|
||||
request,
|
||||
"login/denied.html",
|
||||
{"title": _("You don't have access to this application"),},
|
||||
{"title": _("You don't have access to this application")},
|
||||
)
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
|
@ -175,7 +175,7 @@ class AuthorizeView(AccessRequiredView):
|
|||
return render(
|
||||
request,
|
||||
"saml/idp/login.html",
|
||||
{"provider": self.provider, "title": "Authorize Application",},
|
||||
{"provider": self.provider, "title": "Authorize Application"},
|
||||
)
|
||||
|
||||
except KeyError:
|
||||
|
|
|
@ -142,7 +142,7 @@ CACHES = {
|
|||
f"redis://:{CONFIG.y('redis.password')}@{CONFIG.y('redis.host')}:6379"
|
||||
f"/{CONFIG.y('redis.cache_db')}"
|
||||
),
|
||||
"OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient",},
|
||||
"OPTIONS": {"CLIENT_CLASS": "django_redis.client.DefaultClient"},
|
||||
}
|
||||
}
|
||||
DJANGO_REDIS_IGNORE_EXCEPTIONS = True
|
||||
|
@ -202,9 +202,9 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
{
|
||||
"NAME": "django.contrib.auth.password_validation.UserAttributeSimilarityValidator",
|
||||
},
|
||||
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",},
|
||||
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator",},
|
||||
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator",},
|
||||
{"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator"},
|
||||
{"NAME": "django.contrib.auth.password_validation.CommonPasswordValidator"},
|
||||
{"NAME": "django.contrib.auth.password_validation.NumericPasswordValidator"},
|
||||
]
|
||||
|
||||
|
||||
|
|
|
@ -50,4 +50,4 @@ urlpatterns += [
|
|||
if settings.DEBUG:
|
||||
import debug_toolbar
|
||||
|
||||
urlpatterns = [path("-/debug/", include(debug_toolbar.urls)),] + urlpatterns
|
||||
urlpatterns = [path("-/debug/", include(debug_toolbar.urls))] + urlpatterns
|
||||
|
|
|
@ -284,7 +284,7 @@ class DisconnectView(LoginRequiredMixin, View):
|
|||
"object": self.source,
|
||||
"delete_url": reverse(
|
||||
"passbook_sources_oauth:oauth-client-disconnect",
|
||||
kwargs={"source_slug": self.source.slug,},
|
||||
kwargs={"source_slug": self.source.slug},
|
||||
),
|
||||
},
|
||||
)
|
||||
|
|
Reference in New Issue