Skip to content

Commit f5c573a

Browse files
committed
Update ruff and pre-commit
1 parent 9aca526 commit f5c573a

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ repos:
3030

3131
- repo: https://github.com/astral-sh/ruff-pre-commit
3232
# Ruff version.
33-
rev: v0.0.282
33+
rev: v0.0.285
3434
hooks:
3535
- id: ruff
3636
args: [ --fix, --exit-non-zero-on-fix ]

exec_helpers/_ssh_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575

7676
KeepAlivePeriodT = typing.Union[int, bool]
7777
SupportPathT = typing.Union[str, pathlib.PurePath]
78-
_RT = typing.TypeVar("_RT")
7978

8079

8180
class RetryOnExceptions(tenacity.retry_if_exception):

exec_helpers/exceptions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(
7373
message: str,
7474
*,
7575
result: exec_result.ExecResult,
76-
timeout: int | float,
76+
timeout: float,
7777
) -> None:
7878
"""Exception for error on process calls.
7979
@@ -124,7 +124,7 @@ class ExecHelperNoKillError(ExecHelperTimeoutProcessError):
124124
def __init__(
125125
self,
126126
result: exec_result.ExecResult,
127-
timeout: int | float,
127+
timeout: float,
128128
) -> None:
129129
"""Exception for error on process calls.
130130
@@ -156,7 +156,7 @@ class ExecHelperTimeoutError(ExecHelperTimeoutProcessError):
156156
def __init__(
157157
self,
158158
result: exec_result.ExecResult,
159-
timeout: int | float,
159+
timeout: float,
160160
) -> None:
161161
"""Exception for error on process calls.
162162

exec_helpers/exec_result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ def __str__(self) -> str:
762762
f"{started}{spent})"
763763
)
764764

765-
def __eq__(self, other: typing.Any) -> bool:
765+
def __eq__(self, other: object) -> bool:
766766
"""Comparison.
767767
768768
:param other: other ExecResult instance.
@@ -782,7 +782,7 @@ def __eq__(self, other: typing.Any) -> bool:
782782
and self.exit_code == other.exit_code
783783
)
784784

785-
def __ne__(self, other: typing.Any) -> bool:
785+
def __ne__(self, other: object) -> bool:
786786
"""Comparison.
787787
788788
:param other: other ExecResult instance.

exec_helpers/ssh_auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def __hash__(self) -> int:
236236
)
237237
)
238238

239-
def __eq__(self, other: typing.Any) -> bool:
239+
def __eq__(self, other: object) -> bool:
240240
"""Comparison helper.
241241
242242
:param other: other SSHAuth instance
@@ -246,7 +246,7 @@ def __eq__(self, other: typing.Any) -> bool:
246246
"""
247247
return hash(self) == hash(other)
248248

249-
def __ne__(self, other: typing.Any) -> bool:
249+
def __ne__(self, other: object) -> bool:
250250
"""Comparison helper.
251251
252252
:param other: other SSHAuth instance

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ extend-ignore = [
191191
"RET504", # Unnecessary variable assignment before return statement
192192
"SIM108", # Use ternary operator,
193193
"TRY003", # long messages prepare outside, ...
194-
"PTH118", "PTH119", # `os.path.join()`, `os.path.basename()` should be replaced
195194
]
196195

197196
[tool.ruff.isort]

0 commit comments

Comments
 (0)