mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
chore: enforce more ruff rules (#31447)
Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9da65d6bfd
commit
e51b95ffa8
@@ -26,7 +26,7 @@ from sqlalchemy import column
|
||||
("PT1S", "CAST(DATE_TRUNC('second', CAST(col AS TIMESTAMP)) AS TIMESTAMP)"),
|
||||
(
|
||||
"PT5M",
|
||||
"CAST(ROUND(DATE_TRUNC('minute', CAST(col AS TIMESTAMP)), 300000) AS TIMESTAMP)",
|
||||
"CAST(ROUND(DATE_TRUNC('minute', CAST(col AS TIMESTAMP)), 300000) AS TIMESTAMP)", # noqa: E501
|
||||
),
|
||||
("P1W", "CAST(DATE_TRUNC('week', CAST(col AS TIMESTAMP)) AS TIMESTAMP)"),
|
||||
("P1M", "CAST(DATE_TRUNC('month', CAST(col AS TIMESTAMP)) AS TIMESTAMP)"),
|
||||
@@ -38,7 +38,7 @@ def test_timegrain_expressions(time_grain: str, expected_result: str) -> None:
|
||||
"""
|
||||
DB Eng Specs (pinot): Test time grain expressions
|
||||
"""
|
||||
from superset.db_engine_specs.pinot import PinotEngineSpec as spec
|
||||
from superset.db_engine_specs.pinot import PinotEngineSpec as spec # noqa: N813
|
||||
|
||||
actual = str(
|
||||
spec.get_timestamp_expr(col=column("col"), pdf=None, time_grain=time_grain)
|
||||
@@ -47,7 +47,7 @@ def test_timegrain_expressions(time_grain: str, expected_result: str) -> None:
|
||||
|
||||
|
||||
def test_extras_without_ssl() -> None:
|
||||
from superset.db_engine_specs.pinot import PinotEngineSpec as spec
|
||||
from superset.db_engine_specs.pinot import PinotEngineSpec as spec # noqa: N813
|
||||
from tests.integration_tests.fixtures.database import default_db_extra
|
||||
|
||||
database = mock.Mock()
|
||||
|
||||
Reference in New Issue
Block a user