Skip to content

Commit

Permalink
I'm using too new a version of mypy for Self.
Browse files Browse the repository at this point in the history
  • Loading branch information
VersusFacit committed Sep 12, 2024
1 parent e961bb0 commit 4a6046f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dbt/adapters/snowflake/relation.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import textwrap

from dataclasses import dataclass, field
from typing import FrozenSet, Optional, Type, Self, Iterator
from typing import FrozenSet, Optional, Type, Iterator, Tuple


from dbt.adapters.base.relation import BaseRelation
Expand Down Expand Up @@ -197,7 +197,7 @@ def get_iceberg_ddl_options(self, config: RelationConfig) -> str:
"""
return textwrap.indent(textwrap.dedent(iceberg_ddl_predicates), " " * 10)

def __drop_conditions(self, old_relation: Self) -> Iterator[tuple[bool, str]]:
def __drop_conditions(self, old_relation: "SnowflakeRelation") -> Iterator[Tuple[bool, str]]:
drop_view_message: str = (
f"Dropping relation {old_relation} because it is a view and target relation {self} "
f"is of type {self.type}."
Expand Down Expand Up @@ -230,7 +230,7 @@ def __drop_conditions(self, old_relation: Self) -> Iterator[tuple[bool, str]]:
drop_iceberg_for_table_message,
)

def needs_to_drop(self, old_relation: Optional[Self]) -> bool:
def needs_to_drop(self, old_relation: Optional["SnowflakeRelation"]) -> bool:
"""
To convert between Iceberg and non-Iceberg relations, a preemptive drop is
required.
Expand Down

0 comments on commit 4a6046f

Please sign in to comment.