Skip to content

Commit

Permalink
typing
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk committed Feb 9, 2024
1 parent d74f4f8 commit c794b35
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion core/dbt/contracts/graph/manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,7 @@ def is_invalid_protected_ref(
def merge_from_artifact(
self,
adapter,
other: "WritableManifest",
other: "Manifest",
selected: AbstractSet[UniqueID],
favor_state: bool = False,
) -> None:
Expand Down
4 changes: 2 additions & 2 deletions core/dbt/graph/selector_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from .graph import UniqueId

from dbt.contracts.graph.manifest import Manifest, WritableManifest
from dbt.contracts.graph.manifest import Manifest
from dbt.contracts.graph.nodes import (
SingularTestNode,
Exposure,
Expand Down Expand Up @@ -725,7 +725,7 @@ def search(self, included_nodes: Set[UniqueId], selector: str) -> Iterator[Uniqu
f'Got an invalid selector "{selector}", expected one of ' f'"{list(state_checks)}"'
)

manifest: WritableManifest = self.previous_state.manifest
manifest: Manifest = self.previous_state.manifest

for unique_id, node in self.all_nodes(included_nodes):
previous_node: Optional[SelectorTarget] = None
Expand Down
4 changes: 2 additions & 2 deletions core/dbt/task/clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dbt.adapters.base import BaseRelation
from dbt.clients.jinja import MacroGenerator
from dbt.context.providers import generate_runtime_model_context
from dbt.contracts.graph.manifest import WritableManifest
from dbt.contracts.graph.manifest import Manifest
from dbt.artifacts.schemas.run import RunStatus, RunResult
from dbt_common.dataclass_schema import dbtClassMixin
from dbt_common.exceptions import DbtInternalError, CompilationError
Expand Down Expand Up @@ -94,7 +94,7 @@ class CloneTask(GraphRunnableTask):
def raise_on_first_error(self):
return False

def _get_deferred_manifest(self) -> Optional[WritableManifest]:
def _get_deferred_manifest(self) -> Optional[Manifest]:
# Unlike other commands, 'clone' always requires a state manifest
# Load previous state, regardless of whether --defer flag has been set
return self._get_previous_state()
Expand Down
6 changes: 3 additions & 3 deletions core/dbt/task/runnable.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import dbt.utils
from dbt.adapters.base import BaseRelation
from dbt.adapters.factory import get_adapter
from dbt.contracts.graph.manifest import WritableManifest
from dbt.contracts.graph.manifest import Manifest
from dbt.contracts.graph.nodes import ResultNode
from dbt.artifacts.schemas.results import NodeStatus, RunningStatus, RunStatus, BaseResult
from dbt.artifacts.schemas.run import RunExecutionResult, RunResult
Expand Down Expand Up @@ -643,7 +643,7 @@ def get_result(self, results, elapsed_time, generated_at):
def task_end_messages(self, results):
print_run_end_messages(results)

def _get_previous_state(self) -> Optional[WritableManifest]:
def _get_previous_state(self) -> Optional[Manifest]:
state = self.previous_defer_state or self.previous_state
if not state:
raise DbtRuntimeError(
Expand All @@ -654,5 +654,5 @@ def _get_previous_state(self) -> Optional[WritableManifest]:
raise DbtRuntimeError(f'Could not find manifest in --state path: "{state}"')
return state.manifest

def _get_deferred_manifest(self) -> Optional[WritableManifest]:
def _get_deferred_manifest(self) -> Optional[Manifest]:
return self._get_previous_state() if self.args.defer else None

0 comments on commit c794b35

Please sign in to comment.