diff --git a/dbt/adapters/databricks/constraints.py b/dbt/adapters/databricks/constraints.py index 44df75ef..96380090 100644 --- a/dbt/adapters/databricks/constraints.py +++ b/dbt/adapters/databricks/constraints.py @@ -1,16 +1,17 @@ +from functools import partial from typing import Any, Callable, Optional, TypeVar + from dbt_common.contracts.constraints import ( ColumnLevelConstraint, - ModelLevelConstraint, ConstraintType, + ModelLevelConstraint, ) -from dbt_common.exceptions import DbtValidationError from dbt_common.events.functions import warn_or_error +from dbt_common.exceptions import DbtValidationError + from dbt.adapters.base import ConstraintSupport -from dbt.adapters.events.types import ConstraintNotSupported, ConstraintNotEnforced from dbt.adapters.databricks.logging import logger -from functools import partial - +from dbt.adapters.events.types import ConstraintNotEnforced, ConstraintNotSupported # Support constants CONSTRAINT_SUPPORT = { diff --git a/tests/unit/test_constraints.py b/tests/unit/test_constraints.py index b5047704..343e0b71 100644 --- a/tests/unit/test_constraints.py +++ b/tests/unit/test_constraints.py @@ -1,12 +1,13 @@ -from mock import patch import pytest from dbt_common.contracts.constraints import ( - ConstraintType, ColumnLevelConstraint, + ConstraintType, ModelLevelConstraint, ) -from dbt.adapters.databricks import constraints from dbt_common.exceptions import DbtValidationError +from mock import patch + +from dbt.adapters.databricks import constraints class TestConstraintsSupported: