mistercrunch commented on a change in pull request #3847: [flake8] Resolving 
Q??? errors
URL: 
https://github.com/apache/incubator-superset/pull/3847#discussion_r185256223
 
 

 ##########
 File path: superset/db_engine_specs.py
 ##########
 @@ -1068,21 +1068,21 @@ class ImpalaEngineSpec(BaseEngineSpec):
     engine = 'impala'
 
     time_grains = (
-        Grain("Time Column", _('Time Column'), "{col}"),
-        Grain("minute", _('minute'), "TRUNC({col}, 'MI')"),
-        Grain("hour", _('hour'), "TRUNC({col}, 'HH')"),
-        Grain("day", _('day'), "TRUNC({col}, 'DD')"),
-        Grain("week", _('week'), "TRUNC({col}, 'WW')"),
-        Grain("month", _('month'), "TRUNC({col}, 'MONTH')"),
-        Grain("quarter", _('quarter'), "TRUNC({col}, 'Q')"),
-        Grain("year", _('year'), "TRUNC({col}, 'YYYY')"),
+        Grain('Time Column', _('Time Column'), '{col}'),
+        Grain('minute', _('minute'), "TRUNC({col}, 'MI')"),
+        Grain('hour', _('hour'), "TRUNC({col}, 'HH')"),
+        Grain('day', _('day'), "TRUNC({col}, 'DD')"),
+        Grain('week', _('week'), "TRUNC({col}, 'WW')"),
+        Grain('month', _('month'), "TRUNC({col}, 'MONTH')"),
+        Grain('quarter', _('quarter'), "TRUNC({col}, 'Q')"),
+        Grain('year', _('year'), "TRUNC({col}, 'YYYY')"),
     )
 
     @classmethod
     def convert_dttm(cls, target_type, dttm):
         tt = target_type.upper()
         if tt == 'DATE':
-            return "'{}'".format(dttm.strftime('%Y-%m-%d'))
+            return "{}'".format(dttm.strftime('%Y-%m-%d'))
 
 Review comment:
   This caused: https://github.com/apache/incubator-superset/issues/4915

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to