Skip to content

Commit

Permalink
Modify a function to keep the type checker happy
Browse files Browse the repository at this point in the history
psutil can return none for the number of logical cpus
  • Loading branch information
manthey committed Nov 4, 2024
1 parent 6b70806 commit b3f0425
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion large_image/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def cpu_count(logical: bool = True) -> int:
try:
import psutil

count = min(count, psutil.cpu_count(logical))
count = min(count, psutil.cpu_count(logical) or count)
except ImportError:
pass
return max(1, count)
Expand Down

0 comments on commit b3f0425

Please sign in to comment.