diff --git a/src/toil/lib/threading.py b/src/toil/lib/threading.py index 27a74d7a17..e24c7a619a 100644 --- a/src/toil/lib/threading.py +++ b/src/toil/lib/threading.py @@ -252,7 +252,7 @@ def cpu_count() -> int: return cast(int, cached) # Get the fallback answer of all the CPUs on the machine - psutil_cpu_count = cast(Optional[int], psutil.cpu_count(logical=True)) + psutil_cpu_count = psutil.cpu_count(logical=True) if psutil_cpu_count is None: logger.debug("Could not retrieve the logical CPU count.")