Skip to content

Commit

Permalink
Use stdlib typing where possible (nv-legate#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryevdv authored May 9, 2022
1 parent 73c76c6 commit 81eea77
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions legate/core/constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
from __future__ import annotations

from collections.abc import Iterable
from typing import TYPE_CHECKING, Any, Iterator, Optional, Union

from typing_extensions import Protocol
from typing import TYPE_CHECKING, Any, Iterator, Optional, Protocol, Union

from .partition import Restriction

Expand Down
3 changes: 2 additions & 1 deletion legate/core/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,14 @@
Any,
Callable,
Optional,
Protocol,
Sequence,
Tuple,
Union,
overload,
)

import pyarrow as pa
from typing_extensions import Protocol, overload

from . import (
ArgumentMap,
Expand Down
4 changes: 1 addition & 3 deletions legate/core/operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
#
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Iterable, Optional, Union

from typing_extensions import Protocol
from typing import TYPE_CHECKING, Any, Iterable, Optional, Protocol, Union

import legate.core.types as ty

Expand Down
4 changes: 2 additions & 2 deletions legate/core/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
from __future__ import annotations

from functools import reduce
from typing import TYPE_CHECKING, Iterable, Iterator, Optional, Union
from typing import TYPE_CHECKING, Iterable, Iterator, Optional, Union, overload

from typing_extensions import TypeAlias, overload
from typing_extensions import TypeAlias

if TYPE_CHECKING:
from . import IndexSpace
Expand Down
3 changes: 1 addition & 2 deletions legate/core/transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
#
from __future__ import annotations

from typing import TYPE_CHECKING, Tuple
from typing import TYPE_CHECKING, Protocol, Tuple

import numpy as np
from typing_extensions import Protocol

from . import AffineTransform
from .partition import Replicate, Restriction, Tiling
Expand Down

0 comments on commit 81eea77

Please sign in to comment.