superset-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnbod...@apache.org
Subject [incubator-superset] 12/43: fix lint
Date Fri, 11 Jan 2019 02:22:16 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 481e038522187df3becfbbb5c35bb295f1badc5f
Author: Conglei Shi <conglei.shi@airbnb.com>
AuthorDate: Thu Nov 15 00:03:01 2018 -0800

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

diff --git a/superset/common/query_context.py b/superset/common/query_context.py
index c94e845..c0f309f 100644
--- a/superset/common/query_context.py
+++ b/superset/common/query_context.py
@@ -2,22 +2,23 @@
 from datetime import datetime, timedelta
 import logging
 import pickle as pkl
-from typing import Dict, List
 import traceback
-
+from typing import Dict, List
 
 import numpy as np
 import pandas as pd
 
+from superset import app, cache
 from superset import db
-from superset import cache
 from superset.connectors.connector_registry import ConnectorRegistry
+from superset.utils import core as utils
 from superset.utils.core import DTTM_ALIAS
 from .query_object import QueryObject
 
 config = app.config
 stats_logger = config.get('STATS_LOGGER')
 
+
 class QueryContext:
     """
     The query context contains the query object and additional fields necessary
@@ -57,7 +58,7 @@ class QueryContext:
 
         timestamp_format = None
         if self.datasource.type == 'table':
-            dttm_col = self.datasource.get_col(query_obj.granularity)
+            dttm_col = self.datasource.get_col(query_object.granularity)
             if dttm_col:
                 timestamp_format = dttm_col.python_date_format
 
diff --git a/superset/common/query_object.py b/superset/common/query_object.py
index c91ccd8..b1dc063 100644
--- a/superset/common/query_object.py
+++ b/superset/common/query_object.py
@@ -1,6 +1,6 @@
 # pylint: disable=R
-from typing import Dict, List, Optional
 import hashlib
+from typing import Dict, List, Optional
 
 import simplejson as json
 


Mime
View raw message