Skip to content

Commit 8c77a08

Browse files
[pre-commit.ci] pre-commit autoupdate (#315)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.4 → v0.8.1](astral-sh/ruff-pre-commit@v0.7.4...v0.8.1) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 98c70bc commit 8c77a08

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repos:
1313
hooks:
1414
- id: check-yaml
1515
- repo: https://github.com/astral-sh/ruff-pre-commit
16-
rev: v0.7.4
16+
rev: v0.8.1
1717
hooks:
1818
- id: ruff
1919
args: [ --fix ]

src/execnet/__init__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,24 +29,24 @@
2929
from .xspec import XSpec
3030

3131
__all__ = [
32-
"__version__",
33-
"makegateway",
34-
"set_execmodel",
35-
"HostNotFound",
36-
"RemoteError",
37-
"TimeoutError",
38-
"XSpec",
32+
"Channel",
33+
"DataFormatError",
34+
"DumpError",
3935
"Gateway",
4036
"Group",
37+
"HostNotFound",
38+
"LoadError",
4139
"MultiChannel",
4240
"RSync",
41+
"RemoteError",
42+
"TimeoutError",
43+
"XSpec",
44+
"__version__",
4345
"default_group",
44-
"Channel",
45-
"dumps",
4646
"dump",
47-
"DumpError",
48-
"loads",
47+
"dumps",
4948
"load",
50-
"LoadError",
51-
"DataFormatError",
49+
"loads",
50+
"makegateway",
51+
"set_execmodel",
5252
]

src/execnet/gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def remoteaddress(self) -> str:
4040
def __repr__(self) -> str:
4141
"""A string representing gateway type and status."""
4242
try:
43-
r: str = self.hasreceiver() and "receive-live" or "not-receiving"
43+
r: str = (self.hasreceiver() and "receive-live") or "not-receiving"
4444
i = str(len(self._channelfactory.channels()))
4545
except AttributeError:
4646
r = "uninitialized"

src/execnet/gateway_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ def setcallback(
760760
callback(olditem)
761761

762762
def __repr__(self) -> str:
763-
flag = self.isclosed() and "closed" or "open"
763+
flag = (self.isclosed() and "closed") or "open"
764764
return "<Channel id=%d %s>" % (self.id, flag)
765765

766766
def __del__(self) -> None:
@@ -1079,7 +1079,7 @@ def close(self) -> None:
10791079
self.channel.close()
10801080

10811081
def __repr__(self) -> str:
1082-
state = self.channel.isclosed() and "closed" or "open"
1082+
state = (self.channel.isclosed() and "closed") or "open"
10831083
return "<ChannelFile %d %s>" % (self.channel.id, state)
10841084

10851085

src/execnet/multi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def makegateway(self, spec: XSpec | str | None = None) -> Gateway:
177177
os.environ[name] = value
178178
"""
179179
)
180-
nice = spec.nice and int(spec.nice) or 0
180+
nice = (spec.nice and int(spec.nice)) or 0
181181
channel.send((spec.chdir, nice, spec.env))
182182
channel.waitclose()
183183
return gw

0 commit comments

Comments
 (0)