Skip to content

Commit

Permalink
Method get_data() has self param:
Browse files Browse the repository at this point in the history
- removing # pylint: disable=no-self-use
- autoformatting
  • Loading branch information
kkucharc committed Sep 17, 2020
1 parent 5cbcd55 commit e6a1c0f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions superset/common/query_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ def df_metrics_to_num(df: pd.DataFrame, query_object: QueryObject) -> None:
if dtype.type == np.object_ and col in query_object.metrics:
df[col] = pd.to_numeric(df[col], errors="coerce")

def get_data(
self, df: pd.DataFrame,
) -> Union[str, List[Dict[str, Any]]]: # pylint: disable=no-self-use
def get_data(self, df: pd.DataFrame,) -> Union[str, List[Dict[str, Any]]]:
if self.result_format == utils.ChartDataResultFormat.CSV:
include_index = not isinstance(df.index, pd.RangeIndex)
result = df.to_csv(index=include_index, **config["CSV_EXPORT"])
Expand Down

0 comments on commit e6a1c0f

Please sign in to comment.