diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f04aadfa4c8..50e05c239d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -88,4 +88,4 @@ repos: - zict - pyarrow -# Increase this by 1 to force-wipe the pre-commit github action cache: 1 +# Increase this by 1 to force-wipe the pre-commit github action cache: 2 diff --git a/distributed/system_monitor.py b/distributed/system_monitor.py index 80c2e1c1d54..d92dac6c119 100644 --- a/distributed/system_monitor.py +++ b/distributed/system_monitor.py @@ -70,8 +70,7 @@ def __init__( else: if disk_ioc is None: # pragma: nocover # diskless machine - # FIXME https://github.com/python/typeshed/pull/8829 - monitor_disk_io = False # type: ignore[unreachable] + monitor_disk_io = False else: self._last_disk_io_counters = disk_ioc self.quantities["host_disk_io.read_bps"] = deque(maxlen=maxlen) @@ -143,6 +142,7 @@ def update(self) -> dict[str, Any]: if self.monitor_disk_io: disk_ioc = psutil.disk_io_counters() + assert disk_ioc is not None last_disk = self._last_disk_io_counters result["host_disk_io.read_bps"] = ( disk_ioc.read_bytes - last_disk.read_bytes