Skip to content

Commit

Permalink
update types
Browse files Browse the repository at this point in the history
  • Loading branch information
prha committed Jan 17, 2025
1 parent 80dadc7 commit 9d20984
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from collections import OrderedDict, defaultdict
from collections.abc import Iterable, Iterator, Mapping, Sequence
from collections.abc import Iterable, Iterator, Mapping, Sequence, Set
from typing import ( # noqa: UP035
TYPE_CHECKING,
AbstractSet,
Expand Down Expand Up @@ -809,7 +809,7 @@ def tags(self) -> Mapping[str, str]:
return super().tags

@property
def pools(self) -> set[str]:
def pools(self) -> Set[str]:
pools = set()
for node_def in self.node_defs:
pools.update(node_def.pools)
Expand Down Expand Up @@ -1050,7 +1050,7 @@ def _validate_in_mappings(
from dagster._core.definitions.composition import MappedInputPlaceholder

input_defs_by_name: dict[str, InputDefinition] = OrderedDict()
mapping_keys: set[str] = set()
mapping_keys: Set[str] = set()

target_input_types_by_graph_input_name: dict[str, set[DagsterType]] = defaultdict(set)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from abc import abstractmethod
from collections.abc import Iterable, Iterator, Mapping, Sequence
from collections.abc import Iterable, Iterator, Mapping, Sequence, Set
from typing import TYPE_CHECKING, AbstractSet, Optional # noqa: UP035

import dagster._check as check
Expand Down Expand Up @@ -235,4 +235,4 @@ def get_op_output_handles(

@property
@abstractmethod
def pools(self) -> set[str]: ...
def pools(self) -> Set[str]: ...
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import inspect
from collections.abc import Iterator, Mapping, Sequence
from collections.abc import Iterator, Mapping, Sequence, Set
from typing import TYPE_CHECKING, AbstractSet, Any, Callable, Optional, Union, cast # noqa: UP035

from typing_extensions import TypeAlias, get_args, get_origin
Expand Down Expand Up @@ -301,7 +301,7 @@ def pool(self) -> Optional[str]:
return self._pool if self._pool else self.tags.get(GLOBAL_CONCURRENCY_TAG)

@property
def pools(self) -> set[str]:
def pools(self) -> Set[str]:
"""Optional[str]: The concurrency pools for this op node."""
return {self._pool} if self._pool else set()

Expand Down
6 changes: 3 additions & 3 deletions python_modules/dagster/dagster/_core/snap/node.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Mapping, Sequence
from collections.abc import Mapping, Sequence, Set
from functools import cached_property
from typing import Optional, Union

Expand Down Expand Up @@ -159,7 +159,7 @@ class GraphDefSnap:
dep_structure_snapshot: DependencyStructureSnapshot
input_mapping_snaps: Sequence[InputMappingSnap]
output_mapping_snaps: Sequence[OutputMappingSnap]
pools: set[str]
pools: Set[str]

@cached_property
def input_def_map(self) -> Mapping[str, InputDefSnap]:
Expand All @@ -178,7 +178,7 @@ def get_output_snap(self, name: str) -> OutputDefSnap:

@whitelist_for_serdes(storage_name="SolidDefSnap")
@record
class OpDefSnap(IHaveNew):
class OpDefSnap:
name: str
input_def_snaps: Sequence[InputDefSnap]
output_def_snaps: Sequence[OutputDefSnap]
Expand Down

0 comments on commit 9d20984

Please sign in to comment.