Skip to content

Commit

Permalink
chore(deps): update mypy from ~= 1.13 to ~= 1.14, types-psutil from ~…
Browse files Browse the repository at this point in the history
…= 5.9 to ~= 6.1 and change version expression of deadline-cloud-test-fixtures

Signed-off-by: Evan Spearman <[email protected]>
  • Loading branch information
evanspearman-a authored Jan 21, 2025
1 parent 7dca49c commit e937d6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 3 additions & 3 deletions requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ backoff == 2.2.*
coverage[toml] ~= 7.6
coverage-conditional-plugin == 0.9.*
# The fixture code relies on a bugfix in 0.17.1
deadline-cloud-test-fixtures >= 0.17.1, == 0.17.*
deadline-cloud-test-fixtures >= 0.17.1, < 0.18
flaky == 3.8.*
pytest ~= 8.3
pytest-cov == 6.0.*
Expand All @@ -11,9 +11,9 @@ pytest-xdist == 3.6.*
black[jupyter] ~= 24.10
rich == 13.9.*
types-python-dateutil ~= 2.9
mypy ~= 1.13
mypy ~= 1.14
types-requests ~= 2.31; python_version < "3.10"
types-requests ~= 2.32; python_version >= "3.10"
ruff ~= 0.9.2
twine ~= 6.0
types-psutil ~= 5.9
types-psutil ~= 6.1
5 changes: 4 additions & 1 deletion src/deadline_worker_agent/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ def detect_system_capabilities() -> Capabilities:

attributes[AttributeCapabilityName("attr.worker.cpu.arch")] = [_get_arch()]

amounts[AmountCapabilityName("amount.worker.vcpu")] = float(psutil.cpu_count())
cpu_count = psutil.cpu_count()
if cpu_count is None:
raise RuntimeError("Unable to determine cpu count")
amounts[AmountCapabilityName("amount.worker.vcpu")] = float(cpu_count)
amounts[AmountCapabilityName("amount.worker.memory")] = float(psutil.virtual_memory().total) / (
1024.0**2
)
Expand Down

0 comments on commit e937d6b

Please sign in to comment.