d
This commit is contained in:
@@ -35,8 +35,8 @@ def _normalize_thread_count(value: object, *, field_name: str = "thread_count")
|
||||
thread_count = int(value)
|
||||
except Exception as exc:
|
||||
raise ValueError(f"{field_name} must be an integer") from exc
|
||||
if thread_count < 1 or thread_count > 256:
|
||||
raise ValueError(f"{field_name} out of range")
|
||||
if thread_count < 1:
|
||||
raise ValueError(f"{field_name} must be >= 1")
|
||||
return thread_count
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user