Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/sh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
from queue import Empty, Queue
from shlex import quote as shlex_quote
from types import GeneratorType, GenericAlias, ModuleType
from typing import Any, Dict, Type, Union
from typing import Any

__project_url__ = "https://github.com/amoffat/sh"

Expand Down Expand Up @@ -241,7 +241,7 @@ def poll(self, timeout):
# by zhangyafeikimi when he discovered that if the fds created internally by sh
# numbered > 1024, select.select failed (a limitation of select.select). this
# can happen if your script opens a lot of files
Poller: Union[Type[SelectPoller], Type[PollPoller]] = SelectPoller
Poller: type[SelectPoller | PollPoller] = SelectPoller
if HAS_POLL and not FORCE_USE_SELECT:
Poller = PollPoller

Expand Down Expand Up @@ -367,7 +367,7 @@ class CommandNotFound(AttributeError):


rc_exc_regex = re.compile(r"(ErrorReturnCode|SignalException)_((\d+)|SIG[a-zA-Z0-9]+)")
rc_exc_cache: Dict[str, Type[ErrorReturnCode]] = {}
rc_exc_cache: dict[str, type[ErrorReturnCode]] = {}

SIGNAL_MAPPING = {
v: k for k, v in signal.__dict__.items() if re.match(r"SIG[a-zA-Z]+", k)
Expand Down Expand Up @@ -1168,7 +1168,7 @@ class Command:
thread_local = threading.local()
RunningCommandCls = RunningCommand

_call_args: Dict[str, Any] = {
_call_args: dict[str, Any] = {
"fg": False, # run command in foreground
# run a command in the background. commands run in the background
# ignore SIGHUP and do not automatically exit when the parent process
Expand Down
Loading