Skip to content

Commit

Permalink
Merge pull request #324 from pytest-dev/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
nicoddemus authored Jan 14, 2025
2 parents 31e039e + fb4a7d4 commit 1c21dc9
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ repos:
hooks:
- id: check-yaml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
rev: v0.9.1
hooks:
- id: ruff
args: [ --fix ]
Expand Down
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ python:
install:
- method: pip
path: .

sphinx:
configuration: doc/conf.py
5 changes: 2 additions & 3 deletions doc/example/sysinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,15 @@
action="store",
dest="ssh_config",
default=None,
help="use given ssh config file,"
" and add info all contained hosts for getting info",
help="use given ssh config file, and add info all contained hosts for getting info",
)
parser.add_option(
"-i",
"--ignore",
action="store",
dest="ignores",
default=None,
help="ignore hosts " "(useful if the list of hostnames come from a file list)",
help="ignore hosts (useful if the list of hostnames come from a file list)",
)


Expand Down
4 changes: 2 additions & 2 deletions src/execnet/gateway_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@ def _terminate_execution(self) -> None:
self._trace("shutting down execution pool")
self._execpool.trigger_shutdown()
if not self._execpool.waitall(5.0):
self._trace("execution ongoing after 5 secs," " trying interrupt_main")
self._trace("execution ongoing after 5 secs, trying interrupt_main")
# We try hard to terminate execution based on the assumption
# that there is only one gateway object running per-process.
if sys.platform != "win32":
Expand All @@ -1248,7 +1248,7 @@ def _terminate_execution(self) -> None:
interrupt_main()
if not self._execpool.waitall(10.0):
self._trace(
"execution did not finish in another 10 secs, " "calling os._exit()"
"execution did not finish in another 10 secs, calling os._exit()"
)
os._exit(1)

Expand Down
2 changes: 1 addition & 1 deletion src/execnet/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def set_execmodel(
"""
if self._gateways:
raise ValueError(
"can not set execution models if " "gateways have been created already"
"can not set execution models if gateways have been created already"
)
if remote_execmodel is None:
remote_execmodel = execmodel
Expand Down
2 changes: 1 addition & 1 deletion src/execnet/rsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def send(self, raises: bool = True) -> None:
if not self._channels:
if raises:
raise OSError(
"no targets available, maybe you " "are trying call send() twice?"
"no targets available, maybe you are trying call send() twice?"
)
return
# normalize a trailing '/' away
Expand Down
6 changes: 2 additions & 4 deletions testing/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ def gw(
proxygw = group.makegateway("popen//id=%s" % pname)
# assert group['proxygw'].remote_status().receiving
gw = group.makegateway(
f"socket//id=socket//installvia={pname}"
f"//execmodel={execmodel.backend}"
f"socket//id=socket//installvia={pname}//execmodel={execmodel.backend}"
)
# TODO(typing): Clarify this assignment.
gw.proxygw = proxygw # type: ignore[attr-defined]
Expand All @@ -176,8 +175,7 @@ def gw(
elif request.param == "proxy":
group.makegateway("popen//id=proxy-transport")
gw = group.makegateway(
"popen//via=proxy-transport//id=proxy"
"//execmodel=%s" % execmodel.backend
"popen//via=proxy-transport//id=proxy//execmodel=%s" % execmodel.backend
)
else:
assert 0, f"unknown execmodel: {request.param}"
Expand Down
6 changes: 3 additions & 3 deletions testing/test_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,9 @@ def test_popen_stderr_tracing(
gw.exit()

def test_no_tracing_by_default(self):
assert (
gateway_base.trace == gateway_base.notrace
), "trace does not to default to empty tracing"
assert gateway_base.trace == gateway_base.notrace, (
"trace does not to default to empty tracing"
)


@pytest.mark.parametrize(
Expand Down
5 changes: 2 additions & 3 deletions testing/test_xspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_norm_attributes(self) -> None:
assert spec.chdir is None
assert spec.nice == "3"

spec = XSpec("ssh=user@host" "//chdir=/hello/this//python=/usr/bin/python2.5")
spec = XSpec("ssh=user@host//chdir=/hello/this//python=/usr/bin/python2.5")
assert spec.ssh == "user@host"
assert spec.python == "/usr/bin/python2.5"
assert spec.chdir == "/hello/this"
Expand All @@ -56,8 +56,7 @@ def test_ssh_options(self) -> None:
assert spec.python == "python3"

spec = XSpec(
"ssh=-i ~/.ssh/id_rsa-passwordless_login -p 22100 user@host"
"//python=python3"
"ssh=-i ~/.ssh/id_rsa-passwordless_login -p 22100 user@host//python=python3"
)
assert spec.ssh == "-i ~/.ssh/id_rsa-passwordless_login -p 22100 user@host"
assert spec.python == "python3"
Expand Down

0 comments on commit 1c21dc9

Please sign in to comment.