Skip to content

Commit

Permalink
address pre-commit checks
Browse files Browse the repository at this point in the history
  • Loading branch information
AdheipSingh committed Jan 31, 2025
1 parent 5d19e0d commit eb3ddcf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions superset/db_engine_specs/parseable.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@

if TYPE_CHECKING:
from superset.connectors.sqla.models import TableColumn
from superset.models.core import Database

Check warning on line 29 in superset/db_engine_specs/parseable.py

View check run for this annotation

Codecov / codecov/patch

superset/db_engine_specs/parseable.py#L28-L29

Added lines #L28 - L29 were not covered by tests


class ParseableEngineSpec(BaseEngineSpec):
"""Engine spec for Parseable log analytics database."""

engine = "parseable"
engine_name = "Parseable"

# Use same expressions as SQLAlchemy dialect for consistency
_time_grain_expressions = {
None: "{col}",
TimeGrain.SECOND: "date_trunc('second', {col})",
Expand Down Expand Up @@ -71,7 +73,7 @@ def alter_new_orm_column(cls, orm_col: TableColumn) -> None:
orm_col.is_dttm = True

@classmethod
def get_extra_params(cls, database: "Database") -> dict[str, Any]:
def get_extra_params(cls, database: Database) -> dict[str, Any]:
"""Additional parameters for Parseable connections."""
return {

Check warning on line 78 in superset/db_engine_specs/parseable.py

View check run for this annotation

Codecov / codecov/patch

superset/db_engine_specs/parseable.py#L78

Added line #L78 was not covered by tests
"engine_params": {
Expand Down
4 changes: 2 additions & 2 deletions tests/unit_tests/db_engine_specs/test_parseable.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ def test_convert_dttm(
"""
DB Eng Specs (parseable): Test conversion to date time
"""
from superset.db_engine_specs.parseable import ParseableEngineSpec as spec
from superset.db_engine_specs.parseable import ParseableEngineSpec

assert_convert_dttm(spec, target_type, expected_result, dttm)
assert_convert_dttm(ParseableEngineSpec, target_type, expected_result, dttm)

0 comments on commit eb3ddcf

Please sign in to comment.