|
68 | 68 |
|
69 | 69 | KeepAlivePeriodT = typing.Union[int, bool] |
70 | 70 | SupportPathT = typing.Union[str, pathlib.PurePath] |
71 | | -_RType = typing.TypeVar("_RType") |
| 71 | +_RT = typing.TypeVar("_RT") |
72 | 72 |
|
73 | 73 |
|
74 | 74 | class RetryOnExceptions(tenacity.retry_if_exception): # type: ignore[name-defined,misc] |
@@ -653,12 +653,12 @@ def _ssh_transport(self) -> paramiko.Transport: |
653 | 653 | """ |
654 | 654 | with self.lock: |
655 | 655 | transport = self.__ssh.get_transport() |
656 | | - if transport is not None: |
| 656 | + if transport is not None: # pylint: disable=consider-using-assignment-expr |
657 | 657 | return transport |
658 | 658 |
|
659 | 659 | self.reconnect() |
660 | 660 | transport = self.__ssh.get_transport() |
661 | | - if transport is not None: |
| 661 | + if transport is not None: # pylint: disable=consider-using-assignment-expr |
662 | 662 | return transport |
663 | 663 | raise ConnectionError("Can not get SSH transport (with reconnect)") |
664 | 664 |
|
@@ -755,7 +755,7 @@ def __get_client(self) -> paramiko.SSHClient: |
755 | 755 |
|
756 | 756 | if config.proxyjump: |
757 | 757 | transport = last_ssh_client.get_transport() |
758 | | - if transport is None: |
| 758 | + if transport is None: # pylint: disable=consider-using-assignment-expr |
759 | 759 | raise ConnectionError("Can not get SSH transport") |
760 | 760 | sock = transport.open_channel( |
761 | 761 | kind="direct-tcpip", |
@@ -934,7 +934,7 @@ def _prepare_command(self, cmd: str, chroot_path: str | None = None) -> str: |
934 | 934 | return f'chroot {target_path} sudo sh -c {shlex.quote(f"eval {quoted_command}")}' |
935 | 935 |
|
936 | 936 | # noinspection PyMethodOverriding |
937 | | - def _execute_async( # pylint: disable=arguments-differ |
| 937 | + def _execute_async( |
938 | 938 | self, |
939 | 939 | command: str, |
940 | 940 | *, |
@@ -1128,7 +1128,7 @@ def poll_pipes() -> None: |
1128 | 1128 | self.logger.debug(wait_err_msg) |
1129 | 1129 | raise exceptions.ExecHelperTimeoutError(result=result, timeout=timeout) # type: ignore[arg-type] |
1130 | 1130 |
|
1131 | | - def open_execute_context( # pylint: disable=arguments-differ |
| 1131 | + def open_execute_context( |
1132 | 1132 | self, |
1133 | 1133 | command: str, |
1134 | 1134 | *, |
@@ -1184,7 +1184,7 @@ def open_execute_context( # pylint: disable=arguments-differ |
1184 | 1184 | **kwargs, |
1185 | 1185 | ) |
1186 | 1186 |
|
1187 | | - def execute( # pylint: disable=arguments-differ |
| 1187 | + def execute( |
1188 | 1188 | self, |
1189 | 1189 | command: CommandT, |
1190 | 1190 | verbose: bool = False, |
@@ -1331,7 +1331,7 @@ def __call__( |
1331 | 1331 | **kwargs, |
1332 | 1332 | ) |
1333 | 1333 |
|
1334 | | - def check_call( # pylint: disable=arguments-differ |
| 1334 | + def check_call( |
1335 | 1335 | self, |
1336 | 1336 | command: CommandT, |
1337 | 1337 | verbose: bool = False, |
@@ -1418,7 +1418,7 @@ def check_call( # pylint: disable=arguments-differ |
1418 | 1418 | **kwargs, |
1419 | 1419 | ) |
1420 | 1420 |
|
1421 | | - def check_stderr( # pylint: disable=arguments-differ |
| 1421 | + def check_stderr( |
1422 | 1422 | self, |
1423 | 1423 | command: CommandT, |
1424 | 1424 | verbose: bool = False, |
|
0 commit comments