Skip to content

Commit

Permalink
Refactor import statements in capsula modules
Browse files Browse the repository at this point in the history
  • Loading branch information
shunichironomura committed Jan 28, 2024
1 parent 5ee09de commit 974bd03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions capsula/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import queue
import threading
from pathlib import Path
from typing import TYPE_CHECKING, Callable, Generic, Literal, Self, TypeVar
from typing import TYPE_CHECKING, Callable, Generic, Literal, TypeVar

from pydantic import BaseModel

from capsula._reporter import ReporterBase
from capsula.encapsulator import Encapsulator

from ._backport import ParamSpec
from ._backport import ParamSpec, Self
from ._context import ContextBase
from ._watcher import WatcherBase

Expand Down
13 changes: 6 additions & 7 deletions capsula/encapsulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
from collections.abc import Hashable
from contextlib import AbstractContextManager
from itertools import chain
from typing import TYPE_CHECKING, Any, Generic, Self, Tuple, TypeVar, Union

if TYPE_CHECKING:
from ._backport import TypeAlias

if TYPE_CHECKING:
from types import TracebackType
from typing import TYPE_CHECKING, Any, Generic, Tuple, TypeVar, Union

from capsula.utils import ExceptionInfo

Expand All @@ -21,6 +15,11 @@
from ._watcher import WatcherBase
from .exceptions import CapsulaError

if TYPE_CHECKING:
from types import TracebackType

from ._backport import Self, TypeAlias

_CapsuleItemKey: TypeAlias = Union[str, Tuple[str, ...]]


Expand Down

0 comments on commit 974bd03

Please sign in to comment.