Fix mypy type errors in mpi_resources.py#1759
Open
jlnav wants to merge 1 commit into
Open
Conversation
- get_MPI_variant: return type str -> str | None (function already returned None) - get_MPI_runner: add explicit str | None parameter and return type annotations - task_partition: rename local vars to num_procs_int/num_nodes_int/procs_per_node_int to satisfy mypy narrowing; add assert guards for None after rassert calls - get_resources: mark num_procs/num_nodes/procs_per_node params as int | None; guard num_procs is not None before comparison; unpack task_partition result via named variables with type-narrowing asserts; rename output vars for clarity - create_machinefile: mark num_procs param as int | None; fix return type annotation; use (procs_per_node or 1) to avoid None * str error - get_resources, create_machinefile, get_hostlist: assert worker_resources is not None
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #1759 +/- ##
===========================================
+ Coverage 77.04% 77.06% +0.02%
===========================================
Files 79 79
Lines 8325 8334 +9
Branches 1282 1283 +1
===========================================
+ Hits 6414 6423 +9
Misses 1666 1666
Partials 245 245 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.