You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by be...@apache.org on 2026/05/02 03:11:44 UTC
(superset) 02/03: Fix lint
This is an automated email from the ASF dual-hosted git repository.
betodealmeida pushed a commit to branch nodejs-sidecar
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 230c903e6b9f0d7cd21c90cb00797626943388de
Author: Beto Dealmeida <ro...@dealmeida.net>
AuthorDate: Fri May 1 19:28:31 2026 -0400
Fix lint
---
.../plugins/plugin-chart-table/src/TableChart.tsx | 23 ++++++++++++++--------
.../ColumnConfigConstants.test.tsx | 3 +--
tests/integration_tests/charts/data/api_tests.py | 4 ++--
3 files changed, 18 insertions(+), 12 deletions(-)
diff --git a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
index 00fb45150e2..1b9c77c33ee 100644
--- a/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
+++ b/superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
@@ -533,7 +533,12 @@ export default function TableChart<D extends DataRecord = DataRecord>(
// so that cross-filters work on the receiving chart
const resolvedCol = columnLabelToNameMap[col] ?? col;
const val = ensureIsArray(updatedFilters?.[col]);
- if (!val.length || val[0] === null || (val[0] instanceof DateWithFormatter && val[0].input === null))
+ if (
+ !val.length ||
+ val[0] === null ||
+ (val[0] instanceof DateWithFormatter &&
+ val[0].input === null)
+ )
return {
col: resolvedCol,
op: 'IS NULL' as const,
@@ -646,24 +651,22 @@ export default function TableChart<D extends DataRecord = DataRecord>(
// DateWithFormatter objects wrap nulls, so we must check both
if (
dataRecordValue == null ||
- (dataRecordValue instanceof DateWithFormatter && dataRecordValue.input == null)
+ (dataRecordValue instanceof DateWithFormatter &&
+ dataRecordValue.input == null)
) {
drillToDetailFilters.push({
col: col.key,
op: 'IS NULL' as any,
val: null,
});
-
} else if (col.dataType === GenericDataType.Temporal && timeGrain) {
const startTime =
dataRecordValue instanceof Date
? dataRecordValue
: new Date(dataRecordValue as string | number);
- const [rangeStartTime, rangeEndTime] = getTimeRangeFromGranularity(
- startTime,
- timeGrain,
- );
+ const [rangeStartTime, rangeEndTime] =
+ getTimeRangeFromGranularity(startTime, timeGrain);
const timeRangeValue = `${rangeStartTime.toISOString()} : ${rangeEndTime.toISOString()}`;
drillToDetailFilters.push({
@@ -696,7 +699,11 @@ export default function TableChart<D extends DataRecord = DataRecord>(
filters: [
{
col: cellPoint.key,
- op: (cellPoint.value == null || (cellPoint.value instanceof DateWithFormatter && cellPoint.value.input == null) ? 'IS NULL' : '==') as any,
+ op: (cellPoint.value == null ||
+ (cellPoint.value instanceof DateWithFormatter &&
+ cellPoint.value.input == null)
+ ? 'IS NULL'
+ : '==') as any,
val: extractTextFromHTML(cellPoint.value),
},
],
diff --git a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigConstants.test.tsx b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigConstants.test.tsx
index 8d09344a15d..473a81d1de7 100644
--- a/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigConstants.test.tsx
+++ b/superset-frontend/src/explore/components/controls/ColumnConfigControl/ColumnConfigConstants.test.tsx
@@ -19,8 +19,7 @@
import { SHARED_COLUMN_CONFIG_PROPS } from './constants';
-const tokenSeparators =
- SHARED_COLUMN_CONFIG_PROPS.d3NumberFormat.tokenSeparators;
+const { tokenSeparators } = SHARED_COLUMN_CONFIG_PROPS.d3NumberFormat;
test('should allow commas in D3 format inputs', () => {
expect(tokenSeparators).toBeDefined();
diff --git a/tests/integration_tests/charts/data/api_tests.py b/tests/integration_tests/charts/data/api_tests.py
index 8b5eb9f91c6..989050657e6 100644
--- a/tests/integration_tests/charts/data/api_tests.py
+++ b/tests/integration_tests/charts/data/api_tests.py
@@ -1181,7 +1181,7 @@ class TestGetChartDataApi(BaseTestChartDataApi):
}
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
- @with_config(QUERY_CONTEXT_SIDECAR_URL="http://sidecar.internal")
+ @with_config({"QUERY_CONTEXT_SIDECAR_URL": "http://sidecar.internal"})
@mock.patch("superset.charts.data.api.ChartDataRestApi._get_data_response")
@mock.patch("superset.charts.data.api.ChartDataCommand.validate")
@mock.patch(
@@ -1226,7 +1226,7 @@ class TestGetChartDataApi(BaseTestChartDataApi):
}
@pytest.mark.usefixtures("load_birth_names_dashboard_with_slices")
- @with_config(QUERY_CONTEXT_SIDECAR_URL="http://sidecar.internal")
+ @with_config({"QUERY_CONTEXT_SIDECAR_URL": "http://sidecar.internal"})
@mock.patch("superset.charts.data.api.ChartDataRestApi._get_data_response")
@mock.patch("superset.charts.data.api.ChartDataCommand.validate")
@mock.patch(