villebro commented on pull request #14449:
URL: https://github.com/apache/superset/pull/14449#issuecomment-906370157
@exemplary-citizen there's a linting error in one of the files. You can
either setup pre-commit hooks or apply the diff below to fix the problem:
```diff
diff --git a/superset/views/database/views.py
b/superset/views/database/views.py
index 8d0a92f6c..3863b165c 100644
--- a/superset/views/database/views.py
+++ b/superset/views/database/views.py
@@ -406,17 +406,23 @@ class ColumnarToDatabaseView(SimpleFormView):
def form_get(self, form: ColumnarToDatabaseForm) -> None:
form.if_exists.data = "fail"
- def form_post(self, form: ColumnarToDatabaseForm) -> Response: #
pylint: disable=too-many-locals
+ def form_post(
+ self, form: ColumnarToDatabaseForm
+ ) -> Response: # pylint: disable=too-many-locals
database = form.con.data
columnar_table = Table(table=form.name.data,
schema=form.schema.data)
files = form.columnar_file.data
file_type = {file.filename.split(".")[-1] for file in files}
if file_type == {"zip"}:
- zipfile_ob = zipfile.ZipFile(form.columnar_file.data[0]) #
pylint: disable=consider-using-with
+ zipfile_ob = zipfile.ZipFile(
+ form.columnar_file.data[0]
+ ) # pylint: disable=consider-using-with
file_type = {filename.split(".")[-1] for filename in
zipfile_ob.namelist()}
files = [
- io.BytesIO((zipfile_ob.open(filename).read(), filename)[0])
# pylint: disable=consider-using-with
+ io.BytesIO(
+ (zipfile_ob.open(filename).read(), filename)[0]
+ ) # pylint: disable=consider-using-with
for filename in zipfile_ob.namelist()
]
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]