mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: removing unnecessary double spaces, a.k.a. "shotgun holes" (#22852)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user