Re-enable Pylint on some celery-related files (#8765)
* Re-enable pylint for superset/tasks/schedules.py * re-enable pylint for superset/tasks/celery_app.py
This commit is contained in:
parent
c3f15b952d
commit
9c2b27f37a
|
|
@ -14,7 +14,6 @@
|
|||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# pylint: disable=C,R,W
|
||||
|
||||
"""
|
||||
This is the main entrypoint used by Celery workers. As such,
|
||||
|
|
@ -29,6 +28,7 @@ from superset.extensions import celery_app
|
|||
create_app()
|
||||
|
||||
# Need to import late, as the celery_app will have been setup by "create_app()"
|
||||
# pylint: disable=wrong-import-position, unused-import
|
||||
from . import cache, schedules # isort:skip
|
||||
|
||||
# Export the celery app globally for Celery (as run on the cmd line) to find
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# pylint: disable=C,R,W
|
||||
|
||||
"""Utility functions used across Superset"""
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ import urllib.request
|
|||
from collections import namedtuple
|
||||
from datetime import datetime, timedelta
|
||||
from email.utils import make_msgid, parseaddr
|
||||
from urllib.error import URLError
|
||||
from urllib.error import URLError # pylint: disable=ungrouped-imports
|
||||
|
||||
import croniter
|
||||
import simplejson as json
|
||||
|
|
@ -190,11 +189,11 @@ def destroy_webdriver(driver):
|
|||
# and catch-all exceptions
|
||||
try:
|
||||
retry_call(driver.close, tries=2)
|
||||
except Exception:
|
||||
except Exception: # pylint: disable=broad-except
|
||||
pass
|
||||
try:
|
||||
driver.quit()
|
||||
except Exception:
|
||||
except Exception: # pylint: disable=broad-except
|
||||
pass
|
||||
|
||||
|
||||
|
|
@ -348,7 +347,9 @@ def deliver_slice(schedule):
|
|||
|
||||
|
||||
@celery_app.task(name="email_reports.send", bind=True, soft_time_limit=300)
|
||||
def schedule_email_report(task, report_type, schedule_id, recipients=None):
|
||||
def schedule_email_report(
|
||||
task, report_type, schedule_id, recipients=None
|
||||
): # pylint: disable=unused-argument
|
||||
model_cls = get_scheduler_model(report_type)
|
||||
schedule = db.create_scoped_session().query(model_cls).get(schedule_id)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue