chore: Update mypy and fix stubs issue (#24033)

This commit is contained in:
EugeneTorap
2023-05-12 10:47:14 +03:00
committed by GitHub
parent 7fe0ca12c0
commit 4a828f57f4
22 changed files with 49 additions and 39 deletions

View File

@@ -587,7 +587,7 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
CORS(self.superset_app, **self.config["CORS_OPTIONS"])
if self.config["ENABLE_PROXY_FIX"]:
self.superset_app.wsgi_app = ProxyFix( # type: ignore
self.superset_app.wsgi_app = ProxyFix(
self.superset_app.wsgi_app, **self.config["PROXY_FIX_CONFIG"]
)
@@ -606,9 +606,7 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
environ["wsgi.input_terminated"] = True
return self.app(environ, start_response)
self.superset_app.wsgi_app = ChunkedEncodingFix( # type: ignore
self.superset_app.wsgi_app # type: ignore
)
self.superset_app.wsgi_app = ChunkedEncodingFix(self.superset_app.wsgi_app)
if self.config["UPLOAD_FOLDER"]:
try:
@@ -617,9 +615,7 @@ class SupersetAppInitializer: # pylint: disable=too-many-public-methods
pass
for middleware in self.config["ADDITIONAL_MIDDLEWARE"]:
self.superset_app.wsgi_app = middleware( # type: ignore
self.superset_app.wsgi_app
)
self.superset_app.wsgi_app = middleware(self.superset_app.wsgi_app)
# Flask-Compress
Compress(self.superset_app)