Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cemremengu committed Apr 25, 2022
1 parent 658760b commit 2b556b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions superset/reports/commands/execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from uuid import UUID

import pandas as pd

from celery.exceptions import SoftTimeLimitExceeded
from flask_appbuilder.security.sqla.models import User
from sqlalchemy.orm import Session
Expand Down Expand Up @@ -350,6 +349,7 @@ def _get_notification_content(self) -> NotificationContent:
else:
df = pd.read_csv(BytesIO(csv_data))
bio = BytesIO()
# pylint: disable=abstract-class-instantiated
with pd.ExcelWriter(bio, engine="openpyxl") as writer:
df.to_excel(writer, index=False)
data = bio.getvalue()
Expand Down Expand Up @@ -669,9 +669,8 @@ def run(self) -> None:
except Exception as ex:
raise ReportScheduleUnexpectedError(str(ex)) from ex

def validate( # pylint: disable=arguments-differ
self, session: Session = None
) -> None:
# pylint: disable=arguments-differ
def validate(self, session: Session = None) -> None:
# Validate/populate model exists
self._model = ReportScheduleDAO.find_by_id(self._model_id, session=session)
if not self._model:
Expand Down
2 changes: 1 addition & 1 deletion superset/reports/notifications/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def _get_content(self) -> EmailContent:
"""
)

if self._content.data:
if self._content.data and self._content.data_format:
attachment = {
__(
"%(name)s.%(format)s",
Expand Down

0 comments on commit 2b556b2

Please sign in to comment.