etr2460 commented on a change in pull request #8138: [typing] add typing for 
superset/connectors and superset/common
URL: 
https://github.com/apache/incubator-superset/pull/8138#discussion_r318842141
 
 

 ##########
 File path: superset/common/query_object.py
 ##########
 @@ -34,12 +35,28 @@ class QueryObject:
     and druid. The query objects are constructed on the client.
     """
 
+    granularity: str
+    from_dttm: datetime
+    to_dttm: datetime
+    is_timeseries: bool
+    time_shift: timedelta
+    groupby: List[str]
+    metrics: List[Union[Dict, str]]
+    row_limit: int
+    filter: List[str]
+    timeseries_limit: int
+    timeseries_limit_metric: Optional[Dict]
+    order_desc: bool
+    extras: Dict
+    columns: List[str]
+    orderby: List[List]
+
     def __init__(
         self,
         granularity: str,
         metrics: List[Union[Dict, str]],
-        groupby: List[str] = None,
-        filters: List[str] = None,
+        groupby: Optional[List[str]] = None,
 
 Review comment:
   I think this should default groupby to [] instead of None, that way we can 
remove the `Optional` here and the logic on line 83. we should do the same for 
filters, columns, and orderby too

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to