Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-rogers-dbt committed Feb 5, 2025
1 parent 7767b4b commit 335b366
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
1 change: 1 addition & 0 deletions dbt-adapters/src/dbt/adapters/base/impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ def add_catalog_integrations(
@available
def get_catalog_integration(self, integration_name: str) -> CatalogIntegrationProtocol:
return catalogs_client.get_catalog(integration_name)

###
# Methods to set / access a macro resolver
###
Expand Down
2 changes: 1 addition & 1 deletion dbt-adapters/src/dbt/adapters/clients/catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ def get_catalog(integration_name: str) -> CatalogIntegrationProtocol:


def add_catalog(integration: CatalogIntegrationProtocol, catalog_name: str):
_CATALOG_CLIENT.add_integration(integration, catalog_name)
_CATALOG_CLIENT.add_integration(integration, catalog_name)
1 change: 0 additions & 1 deletion dbt-adapters/src/dbt/adapters/contracts/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,3 @@ def _handle_adapter_properties(self, adapter_properties: Dict) -> None: ...

@abc.abstractmethod
def render_ddl_predicates(self, relation, config: RelationConfig) -> str: ...

1 change: 1 addition & 0 deletions dbt-adapters/src/dbt/adapters/contracts/relation.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class RelationConfig(Protocol):
config: Optional[MaterializationConfig]
catalog_name: Optional[str]


class ComponentName(StrEnum):
Database = "database"
Schema = "schema"
Expand Down
1 change: 0 additions & 1 deletion dbt-adapters/src/dbt/adapters/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class CatalogIntegrationProtocol(Protocol):
def __init__(self, integration_config: CatalogIntegrationConfigProtocol) -> None: ...



Self = TypeVar("Self", bound="RelationProtocol")


Expand Down
2 changes: 1 addition & 1 deletion dbt-adapters/src/dbt/adapters/relation_configs/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def default(cls) -> Self:
return cls("default")

def __str__(self):
return self.value
return self.value
2 changes: 1 addition & 1 deletion dbt-adapters/tests/unit/fixtures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
config,
flags,
)
from tests.unit.fixtures.catalog_integration import fake_catalog_integration
from tests.unit.fixtures.catalog_integration import fake_catalog_integration
12 changes: 8 additions & 4 deletions dbt-adapters/tests/unit/fixtures/catalog_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,20 @@

import pytest

from dbt.adapters.contracts.catalog import CatalogIntegration, CatalogIntegrationConfig, CatalogIntegrationType
from dbt.adapters.contracts.catalog import (
CatalogIntegration,
CatalogIntegrationConfig,
CatalogIntegrationType,
)
from dbt.adapters.relation_configs.formats import TableFormat


class FakeCatalogIntegration(CatalogIntegration):
fake_property: int

def _handle_adapter_properties(self, adapter_properties: Dict) -> None:
if 'fake_property' in adapter_properties:
self.fake_property = adapter_properties['fake_property']
if "fake_property" in adapter_properties:
self.fake_property = adapter_properties["fake_property"]

def render_ddl_predicates(self, relation):
return "mocked"
Expand All @@ -30,4 +34,4 @@ def render_ddl_predicates(self, relation):

@pytest.fixture
def fake_catalog_integration():
return catalog
return catalog

0 comments on commit 335b366

Please sign in to comment.