You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ru...@apache.org on 2023/01/25 17:46:20 UTC

[superset] branch shotgun-holes updated: chore: removing unnecessary double spaces, a.k.a. "shotgun holes"

This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch shotgun-holes
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/shotgun-holes by this push:
     new 23707e48dd chore: removing unnecessary double spaces, a.k.a. "shotgun holes"
23707e48dd is described below

commit 23707e48dde5173ad664be8f38dd19f4f5e11f9f
Author: Evan Rusackas <ev...@preset.io>
AuthorDate: Wed Jan 25 10:46:11 2023 -0700

    chore: removing unnecessary double spaces, a.k.a. "shotgun holes"
---
 .../plugins/legacy-plugin-chart-partition/src/controlPanel.tsx |  2 +-
 .../plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx      |  2 +-
 .../plugins/plugin-chart-echarts/src/Timeseries/index.ts       |  4 ++--
 .../src/components/DeprecatedSelect/OnPasteSelect.test.jsx     |  2 +-
 superset-frontend/src/components/Table/Table.stories.tsx       | 10 +++++-----
 .../FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts  |  2 +-
 superset-frontend/src/explore/controlPanels/sections.tsx       |  2 +-
 .../DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx  |  2 +-
 ...5-19_3dda56f1c4c6_migrate_num_period_compare_and_period_.py |  2 +-
 superset/utils/core.py                                         |  2 +-
 superset/views/database/mixins.py                              |  2 +-
 tests/integration_tests/celery_tests.py                        |  2 +-
 tests/integration_tests/db_engine_specs/hive_tests.py          |  2 +-
 tests/integration_tests/db_engine_specs/postgres_tests.py      |  2 +-
 tests/integration_tests/db_engine_specs/presto_tests.py        |  2 +-
 tests/integration_tests/utils/csv_tests.py                     |  2 +-
 tests/unit_tests/utils/date_parser_tests.py                    |  4 ++--
 17 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx b/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx
index d983dca24a..f910a8bbfd 100644
--- a/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx
+++ b/superset-frontend/plugins/legacy-plugin-chart-partition/src/controlPanel.tsx
@@ -317,7 +317,7 @@ const config: ControlPanelConfig = {
               description: t(
                 'Overlay one or more timeseries from a ' +
                   'relative time period. Expects relative time deltas ' +
-                  'in natural language (example:  24 hours, 7 days, ' +
+                  'in natural language (example: 24 hours, 7 days, ' +
                   '52 weeks, 365 days). Free text is supported.',
               ),
             },
diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx
index b45d6de31a..a466b33742 100644
--- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx
+++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/NVD3Controls.tsx
@@ -467,7 +467,7 @@ export const timeSeriesSection: ControlPanelSectionConfig[] = [
             description: t(
               'Overlay one or more timeseries from a ' +
                 'relative time period. Expects relative time deltas ' +
-                'in natural language (example:  24 hours, 7 days, ' +
+                'in natural language (example: 24 hours, 7 days, ' +
                 '52 weeks, 365 days). Free text is supported.',
             ),
           },
diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts
index 4065a170d0..c8210cd981 100644
--- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts
+++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/index.ts
@@ -49,10 +49,10 @@ export default class EchartsTimeseriesChartPlugin extends ChartPlugin<
         credits: ['https://echarts.apache.org'],
         description: hasGenericChartAxes
           ? t(
-              'Swiss army knife for visualizing data. Choose between  step, line, scatter, and bar charts. This viz type has many customization options as well.',
+              'Swiss army knife for visualizing data. Choose between step, line, scatter, and bar charts. This viz type has many customization options as well.',
             )
           : t(
-              'Swiss army knife for visualizing time series data. Choose between  step, line, scatter, and bar charts. This viz type has many customization options as well.',
+              'Swiss army knife for visualizing time series data. Choose between step, line, scatter, and bar charts. This viz type has many customization options as well.',
             ),
         exampleGallery: [{ url: example }],
         supportedAnnotationTypes: [
diff --git a/superset-frontend/src/components/DeprecatedSelect/OnPasteSelect.test.jsx b/superset-frontend/src/components/DeprecatedSelect/OnPasteSelect.test.jsx
index 3aa1641b28..95d01cc28b 100644
--- a/superset-frontend/src/components/DeprecatedSelect/OnPasteSelect.test.jsx
+++ b/superset-frontend/src/components/DeprecatedSelect/OnPasteSelect.test.jsx
@@ -45,7 +45,7 @@ const defaultProps = {
 const defaultEvt = {
   preventDefault: sinon.spy(),
   clipboardData: {
-    getData: sinon.spy(() => ' United States, China  , India, Canada, '),
+    getData: sinon.spy(() => ' United States, China, India, Canada, '),
   },
 };
 
diff --git a/superset-frontend/src/components/Table/Table.stories.tsx b/superset-frontend/src/components/Table/Table.stories.tsx
index 75482e2e37..7ae3525562 100644
--- a/superset-frontend/src/components/Table/Table.stories.tsx
+++ b/superset-frontend/src/components/Table/Table.stories.tsx
@@ -310,16 +310,16 @@ export const Basic: ComponentStory<typeof Table> = args => <Table {...args} />;
 function handlers(record: object, rowIndex: number) {
   return {
     onClick: action(
-      `row onClick, row:  ${rowIndex}, record: ${JSON.stringify(record)}`,
+      `row onClick, row: ${rowIndex}, record: ${JSON.stringify(record)}`,
     ), // click row
     onDoubleClick: action(
-      `row onDoubleClick, row:  ${rowIndex}, record: ${JSON.stringify(record)}`,
+      `row onDoubleClick, row: ${rowIndex}, record: ${JSON.stringify(record)}`,
     ), // double click row
     onContextMenu: action(
-      `row onContextMenu, row:  ${rowIndex}, record: ${JSON.stringify(record)}`,
+      `row onContextMenu, row: ${rowIndex}, record: ${JSON.stringify(record)}`,
     ), // right button click row
-    onMouseEnter: action(`Mouse Enter, row:  ${rowIndex}`), // mouse enter row
-    onMouseLeave: action(`Mouse Leave, row:  ${rowIndex}`), // mouse leave row
+    onMouseEnter: action(`Mouse Enter, row: ${rowIndex}`), // mouse enter row
+    onMouseLeave: action(`Mouse Leave, row: ${rowIndex}`), // mouse leave row
   };
 }
 
diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts
index 150f2b295f..347da2d2ca 100644
--- a/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts
+++ b/superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FilterScope/utils.ts
@@ -85,7 +85,7 @@ export const buildTree = (
       );
     } else {
       logging.warn(
-        `Unable to find item with id: ${child} in the dashboard layout.  This may indicate you have invalid references in your dashboard and the references to id: ${child} should be removed.`,
+        `Unable to find item with id: ${child} in the dashboard layout. This may indicate you have invalid references in your dashboard and the references to id: ${child} should be removed.`,
       );
     }
   });
diff --git a/superset-frontend/src/explore/controlPanels/sections.tsx b/superset-frontend/src/explore/controlPanels/sections.tsx
index fe384c6f39..51b6b9c2f2 100644
--- a/superset-frontend/src/explore/controlPanels/sections.tsx
+++ b/superset-frontend/src/explore/controlPanels/sections.tsx
@@ -195,7 +195,7 @@ export const NVD3TimeSeries: ControlPanelSectionConfig[] = [
             description: t(
               'Overlay one or more timeseries from a ' +
                 'relative time period. Expects relative time deltas ' +
-                'in natural language (example:  24 hours, 7 days, ' +
+                'in natural language (example: 24 hours, 7 days, ' +
                 '52 weeks, 365 days). Free text is supported.',
             ),
           },
diff --git a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
index be60ac0308..99a414012b 100644
--- a/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
+++ b/superset-frontend/src/views/CRUD/data/database/DatabaseModal/DatabaseConnectionForm/CommonParameters.tsx
@@ -90,7 +90,7 @@ export const httpPath = ({
       placeholder={t('e.g. sql/protocolv1/o/12345')}
       label="HTTP Path"
       onChange={changeMethods.onExtraInputChange}
-      helpText={t('Copy the name of the  HTTP Path of your cluster.')}
+      helpText={t('Copy the name of the HTTP Path of your cluster.')}
     />
   );
 };
diff --git a/superset/migrations/versions/2018-07-05_15-19_3dda56f1c4c6_migrate_num_period_compare_and_period_.py b/superset/migrations/versions/2018-07-05_15-19_3dda56f1c4c6_migrate_num_period_compare_and_period_.py
index 1d0d81faaf..2e491e9303 100644
--- a/superset/migrations/versions/2018-07-05_15-19_3dda56f1c4c6_migrate_num_period_compare_and_period_.py
+++ b/superset/migrations/versions/2018-07-05_15-19_3dda56f1c4c6_migrate_num_period_compare_and_period_.py
@@ -56,7 +56,7 @@ db_engine_specs_map = {
     "second": "PT1S",
     "minute": "PT1M",
     "5 minute": "PT5M",
-    "10  minute": "PT10M",
+    "10 minute": "PT10M",
     "half hour": "PT0.5H",
     "hour": "PT1H",
     "day": "P1D",
diff --git a/superset/utils/core.py b/superset/utils/core.py
index 0ab3a685a3..8a92a2d490 100644
--- a/superset/utils/core.py
+++ b/superset/utils/core.py
@@ -429,7 +429,7 @@ def parse_js_uri_path_item(
 
     :param item: a uri path component
     :param unquote: Perform unquoting of string using urllib.parse.unquote_plus()
-    :param eval_undefined: When set to True and item is either 'null'  or 'undefined',
+    :param eval_undefined: When set to True and item is either 'null' or 'undefined',
     assume item is undefined and return None.
     :return: Either None, the original item or unquoted item
     """
diff --git a/superset/views/database/mixins.py b/superset/views/database/mixins.py
index bd83e79439..efd0b6c6eb 100644
--- a/superset/views/database/mixins.py
+++ b/superset/views/database/mixins.py
@@ -102,7 +102,7 @@ class DatabaseMixin:
         ),
         "expose_in_sqllab": _("Expose this DB in SQL Lab"),
         "allow_run_async": _(
-            "Operate the database in asynchronous mode, meaning  "
+            "Operate the database in asynchronous mode, meaning "
             "that the queries are executed on remote workers as opposed "
             "to on the web server itself. "
             "This assumes that you have a Celery worker setup as well "
diff --git a/tests/integration_tests/celery_tests.py b/tests/integration_tests/celery_tests.py
index da6db727e7..d017f9f995 100644
--- a/tests/integration_tests/celery_tests.py
+++ b/tests/integration_tests/celery_tests.py
@@ -111,7 +111,7 @@ def run_sql(
 
 def drop_table_if_exists(table_name: str, table_type: CtasMethod) -> None:
     """Drop table if it exists, works on any DB"""
-    sql = f"DROP {table_type} IF EXISTS  {table_name}"
+    sql = f"DROP {table_type} IF EXISTS {table_name}"
     database = get_example_database()
     with database.get_sqla_engine_with_context() as engine:
         engine.execute(sql)
diff --git a/tests/integration_tests/db_engine_specs/hive_tests.py b/tests/integration_tests/db_engine_specs/hive_tests.py
index b39f265897..432d097b58 100644
--- a/tests/integration_tests/db_engine_specs/hive_tests.py
+++ b/tests/integration_tests/db_engine_specs/hive_tests.py
@@ -358,7 +358,7 @@ def test_where_latest_partition(mock_method):
             "test_table", "test_schema", db, select(), columns
         )
     query_result = str(result.compile(compile_kwargs={"literal_binds": True}))
-    assert "SELECT  \nWHERE ds = '01-01-19' AND hour = 1" == query_result
+    assert "SELECT \nWHERE ds = '01-01-19' AND hour = 1" == query_result
 
 
 @mock.patch("superset.db_engine_specs.presto.PrestoEngineSpec.latest_partition")
diff --git a/tests/integration_tests/db_engine_specs/postgres_tests.py b/tests/integration_tests/db_engine_specs/postgres_tests.py
index a9dbfa515f..03b3e5763f 100644
--- a/tests/integration_tests/db_engine_specs/postgres_tests.py
+++ b/tests/integration_tests/db_engine_specs/postgres_tests.py
@@ -178,7 +178,7 @@ class TestPostgresDbEngineSpec(TestDbEngineSpec):
 
         cursor = mock.Mock()
         cursor.fetchone.return_value = (
-            "Seq Scan on birth_names  (cost=0.00..1537.91 rows=75691 width=46)",
+            "Seq Scan on birth_names (cost=0.00..1537.91 rows=75691 width=46)",
         )
         sql = "SELECT * FROM birth_names"
         results = PostgresEngineSpec.estimate_statement_cost(sql, cursor)
diff --git a/tests/integration_tests/db_engine_specs/presto_tests.py b/tests/integration_tests/db_engine_specs/presto_tests.py
index 9099dbb7d7..117654d8f8 100644
--- a/tests/integration_tests/db_engine_specs/presto_tests.py
+++ b/tests/integration_tests/db_engine_specs/presto_tests.py
@@ -502,7 +502,7 @@ class TestPrestoDbEngineSpec(TestDbEngineSpec):
             "test_table", "test_schema", db, select(), columns
         )
         query_result = str(result.compile(compile_kwargs={"literal_binds": True}))
-        self.assertEqual("SELECT  \nWHERE ds = '01-01-19' AND hour = 1", query_result)
+        self.assertEqual("SELECT \nWHERE ds = '01-01-19' AND hour = 1", query_result)
 
     def test_query_cost_formatter(self):
         raw_cost = [
diff --git a/tests/integration_tests/utils/csv_tests.py b/tests/integration_tests/utils/csv_tests.py
index e514efb1d2..1e7618e193 100644
--- a/tests/integration_tests/utils/csv_tests.py
+++ b/tests/integration_tests/utils/csv_tests.py
@@ -75,7 +75,7 @@ def test_df_to_escaped_csv():
     assert escaped_csv_rows == [
         ["col_a", "'=func()"],
         ["-10", "'=cmd\|' /C calc'!A0"],
-        ["a", "'=b"],  # pandas seems to be removing the leading ""
+        ["a", "'=b"], # pandas seems to be removing the leading ""
         ["' =a", "b"],
     ]
 
diff --git a/tests/unit_tests/utils/date_parser_tests.py b/tests/unit_tests/utils/date_parser_tests.py
index e5b3eebd99..f3c8b69680 100644
--- a/tests/unit_tests/utils/date_parser_tests.py
+++ b/tests/unit_tests/utils/date_parser_tests.py
@@ -163,7 +163,7 @@ def test_datetime_eval() -> None:
     expected = datetime(2016, 11, 7, 9, 30, 10)
     assert result == expected
 
-    result = datetime_eval("datetime('today'  )")
+    result = datetime_eval("datetime('today')")
     expected = datetime(2016, 11, 7)
     assert result == expected
 
@@ -308,7 +308,7 @@ def test_get_past_or_future() -> None:
 
 def test_parse_human_datetime() -> None:
     with pytest.raises(TimeRangeAmbiguousError):
-        parse_human_datetime("  2 days  ")
+        parse_human_datetime("2 days")
 
     with pytest.raises(TimeRangeAmbiguousError):
         parse_human_datetime("2 day")