chore(pylint): Reenable import-outside-toplevel check (#16263)

Co-authored-by: John Bodley <john.bodley@airbnb.com>
This commit is contained in:
John Bodley
2021-08-16 10:20:13 -07:00
committed by GitHub
parent 36abc51f90
commit 0df15bf207
25 changed files with 83 additions and 51 deletions

View File

@@ -714,11 +714,11 @@ def _prophet_fit_and_predict( # pylint: disable=too-many-arguments
Fit a prophet model and return a DataFrame with predicted results.
"""
try:
# pylint: disable=import-error,import-outside-toplevel
from prophet import Prophet
prophet_logger = logging.getLogger("prophet.plot")
prophet_logger.setLevel(logging.CRITICAL)
from prophet import Prophet # pylint: disable=import-error
prophet_logger.setLevel(logging.NOTSET)
except ModuleNotFoundError:
raise QueryObjectValidationError(_("`prophet` package not installed"))