superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnbod...@apache.org
Subject [incubator-superset] 11/43: fix lint
Date Fri, 11 Jan 2019 02:22:15 GMT
This is an automated email from the ASF dual-hosted git repository.

johnbodley pushed a commit to branch feature--embeddable-charts-pilot
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git

commit d75278de959d81f1d490e7a02d70b20723dd5792
Author: Conglei Shi <conglei.shi@airbnb.com>
AuthorDate: Wed Nov 14 23:59:04 2018 -0800

    fix lint
---
 superset/common/query_context.py | 15 +++++++++------
 superset/common/query_object.py  |  9 +++++----
 2 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/superset/common/query_context.py b/superset/common/query_context.py
index f9cc409..c94e845 100644
--- a/superset/common/query_context.py
+++ b/superset/common/query_context.py
@@ -1,16 +1,19 @@
 # pylint: disable=R
-from typing import Dict, List
 from datetime import datetime, timedelta
+import logging
 import pickle as pkl
+from typing import Dict, List
+import traceback
+
+
 import numpy as np
 import pandas as pd
-import logging
 
 from superset import db
-from superset.connectors.connector_registry import ConnectorRegistry
 from superset import cache
-from .query_object import QueryObject
+from superset.connectors.connector_registry import ConnectorRegistry
 from superset.utils.core import DTTM_ALIAS
+from .query_object import QueryObject
 
 config = app.config
 stats_logger = config.get('STATS_LOGGER')
@@ -49,8 +52,8 @@ class QueryContext:
         """Returns a pandas dataframe based on the query object"""
 
         # Here, we assume that all the queries will use the same datasource, which is
-        # is a valid assumption for current setting. In a long term, we may or maynot support
-        # multiple queries from different data source.
+        # is a valid assumption for current setting. In a long term, we may or maynot
+        # support multiple queries from different data source.
 
         timestamp_format = None
         if self.datasource.type == 'table':
diff --git a/superset/common/query_object.py b/superset/common/query_object.py
index 6ade4f0..c91ccd8 100644
--- a/superset/common/query_object.py
+++ b/superset/common/query_object.py
@@ -1,11 +1,12 @@
 # pylint: disable=R
 from typing import Dict, List, Optional
-from superset import app
-from superset.utils import core as utils
-
 import hashlib
+
 import simplejson as json
 
+from superset import app
+from superset.utils import core as utils
+
 
 # TODO: Type Metrics dictionary with TypedDict when it becomes a vanilla python type
 # https://github.com/python/mypy/issues/5288
@@ -33,7 +34,7 @@ class QueryObject:
         self.granularity = granularity
         self.from_dttm, self.to_dttm = utils.get_since_until(time_range, time_shift)
         self.is_timeseries = is_timeseries
-        self.time_range =  time_range
+        self.time_range = time_range
         self.groupby = groupby
         self.metrics = metrics
         self.row_limit = row_limit


Mime
View raw message