Skip to content

Commit 6a606d1

Browse files
all in on hatch + pre-commit update
1 parent d68c591 commit 6a606d1

File tree

5 files changed

+27
-10
lines changed

5 files changed

+27
-10
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,7 @@ repos:
3636
rev: 'v1.8.0'
3737
hooks:
3838
- id: mypy
39+
- repo: https://github.com/tox-dev/pyproject-fmt
40+
rev: "0.4.1"
41+
hooks:
42+
- id: pyproject-fmt

doc/example/test_funcmultiplier.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
def test_function():
2-
import funcmultiplier
2+
import funcmultiplier # type: ignore[import]

src/execnet/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
(c) 2012, Holger Krekel and others
88
"""
99
from ._version import version as __version__
10+
from .gateway_base import Channel
1011
from .gateway_base import DataFormatError
1112
from .gateway_base import RemoteError
1213
from .gateway_base import TimeoutError

src/execnet/script/socketserverservice.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
import sys
1010
import threading
1111

12-
import servicemanager
13-
import win32event
14-
import win32evtlogutil
15-
import win32service
16-
import win32serviceutil
12+
import servicemanager # type: ignore[import]
13+
import win32event # type: ignore[import]
14+
import win32evtlogutil # type: ignore[import]
15+
import win32service # type: ignore[import]
16+
import win32serviceutil # type: ignore[import]
1717

1818
appname = "ExecNetSocketServer"
1919

src/execnet/xspec.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
22
(c) 2008-2013, holger krekel
33
"""
4+
from __future__ import annotations
45

56

67
class XSpec:
@@ -13,9 +14,20 @@ class XSpec:
1314
"""
1415

1516
# XXX allow customization, for only allow specific key names
16-
popen = (
17-
ssh
18-
) = socket = python = chdir = nice = dont_write_bytecode = execmodel = None
17+
18+
_spec: str
19+
20+
id: str | None = None
21+
popen: str | bool | None = None
22+
ssh: str | None = None
23+
socket: str | bool | None = None
24+
python: str | bool | None = None
25+
chdir: str | bool | None = None
26+
nice: str | bool | None = None
27+
dont_write_bytecode: str | bool | None = None
28+
execmodel: str | bool | None = None
29+
30+
env: dict[str, str]
1931

2032
def __init__(self, string):
2133
self._spec = string
@@ -35,7 +47,7 @@ def __init__(self, string):
3547
else:
3648
setattr(self, key, value)
3749

38-
def __getattr__(self, name):
50+
def __getattr__(self, name: str) -> str | bool | None:
3951
if name[0] == "_":
4052
raise AttributeError(name)
4153
return None

0 commit comments

Comments
 (0)