Skip to content

Commit

Permalink
Pass mypy validation on Windows (#6180)
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky authored Apr 24, 2022
1 parent 28fd2f7 commit 5b6a64a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion distributed/comm/asyncio_tcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ class _ZeroCopyWriter:
# pass to sendmsg.
if hasattr(socket.socket, "sendmsg"):
try:
SENDMSG_MAX_COUNT = os.sysconf("SC_IOV_MAX")
SENDMSG_MAX_COUNT = os.sysconf("SC_IOV_MAX") # type: ignore
except Exception:
SENDMSG_MAX_COUNT = 16 # Should be supported on all systems
else:
Expand Down
2 changes: 1 addition & 1 deletion distributed/pytest_resourceleaks.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def measure(self) -> int:
if WINDOWS:
# Don't use num_handles(); you'll get tens of thousands of reported leaks
return 0
return psutil.Process().num_fds()
return psutil.Process().num_fds() # type: ignore

def has_leak(self, before: int, after: int) -> bool:
return after > before
Expand Down
2 changes: 1 addition & 1 deletion distributed/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def memory_limit() -> int:
try:
import resource

hard_limit = resource.getrlimit(resource.RLIMIT_RSS)[1]
hard_limit = resource.getrlimit(resource.RLIMIT_RSS)[1] # type: ignore
if hard_limit > 0:
limit = min(limit, hard_limit)
except (ImportError, OSError):
Expand Down
2 changes: 1 addition & 1 deletion distributed/tests/test_utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ async def test_dump_cluster_unresponsive_remote_worker(c, s, a, b, tmpdir):

def garbage_process(barrier, ignore_sigterm: bool = False, t: float = 3600) -> None:
if ignore_sigterm:
for signum in (signal.SIGTERM, signal.SIGHUP, signal.SIGINT):
for signum in (signal.SIGTERM, signal.SIGHUP, signal.SIGINT): # type: ignore
signal.signal(signum, signal.SIG_IGN)
barrier.wait()
sleep(t)
Expand Down

0 comments on commit 5b6a64a

Please sign in to comment.