diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 109f8bf6..285e4a9d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 ] diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 516834fe..0697e236 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,3 +9,6 @@ python: install: - method: pip path: . + +sphinx: + configuration: doc/conf.py diff --git a/doc/example/sysinfo.py b/doc/example/sysinfo.py index b3fa2d5e..927b57c0 100644 --- a/doc/example/sysinfo.py +++ b/doc/example/sysinfo.py @@ -19,8 +19,7 @@ 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", @@ -28,7 +27,7 @@ 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)", ) diff --git a/src/execnet/gateway_base.py b/src/execnet/gateway_base.py index 22756778..60fa783c 100644 --- a/src/execnet/gateway_base.py +++ b/src/execnet/gateway_base.py @@ -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": @@ -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) diff --git a/src/execnet/multi.py b/src/execnet/multi.py index 90742f26..c4f35813 100644 --- a/src/execnet/multi.py +++ b/src/execnet/multi.py @@ -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 diff --git a/src/execnet/rsync.py b/src/execnet/rsync.py index 84820532..2b5698d8 100644 --- a/src/execnet/rsync.py +++ b/src/execnet/rsync.py @@ -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 diff --git a/testing/conftest.py b/testing/conftest.py index a7c2eede..d9667ac1 100644 --- a/testing/conftest.py +++ b/testing/conftest.py @@ -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] @@ -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}" diff --git a/testing/test_gateway.py b/testing/test_gateway.py index 257fd941..8df5f21e 100644 --- a/testing/test_gateway.py +++ b/testing/test_gateway.py @@ -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( diff --git a/testing/test_xspec.py b/testing/test_xspec.py index eaf30e1d..3e5041be 100644 --- a/testing/test_xspec.py +++ b/testing/test_xspec.py @@ -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" @@ -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"