chore: enforce more ruff rules (#31447)

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
This commit is contained in:
Maxime Beauchemin
2024-12-18 17:41:34 -08:00
committed by GitHub
parent 9da65d6bfd
commit e51b95ffa8
375 changed files with 1821 additions and 1718 deletions

View File

@@ -581,7 +581,7 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
self.superset_app.url_map.converters["regex"] = RegexConverter
self.superset_app.url_map.converters["object_type"] = ObjectTypeConverter
def configure_middlewares(self) -> None:
def configure_middlewares(self) -> None: # noqa: C901
if self.config["ENABLE_CORS"]:
# pylint: disable=import-outside-toplevel
from flask_cors import CORS
@@ -648,7 +648,7 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
"We haven't found any Content Security Policy (CSP) defined in "
"the configurations. Please make sure to configure CSP using the "
"TALISMAN_ENABLED and TALISMAN_CONFIG keys or any other external "
"software. Failing to configure CSP have serious security implications. "
"software. Failing to configure CSP have serious security implications. " # noqa: E501
"Check https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP for more "
"information. You can disable this warning using the "
"CONTENT_SECURITY_POLICY_WARNING key."