Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix call to os.sched_getaffinity() #1251

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

victorlin
Copy link
Member

@victorlin victorlin commented Jul 5, 2023

Description of proposed changes

This fixes an oversight from a recently merged PR.

Related issue(s)

Testing

  • Checks pass

Checklist

  • Add a message in CHANGES.md summarizing the changes in this PR that are end user focused. Keep headers and formatting consistent with the rest of the file. N/A, this is fixing a bug within the same release.

This reverts the changes from 1876886
on this file. When originally written, the assumption was a direct
non-functional replacement. However, that wasn't the case: any errors
from os.sched_getaffinity were no longer handled properly.

The following commit will address the Mypy error (which is now present)
in a way that does not change behavior.
An attempt at addressing the error was first attempted in
1876886 but reverted in the commit
prior to this one. Adding an assert lets static type checkers know that
function in the next line is available.
@victorlin victorlin requested a review from tsibley July 5, 2023 20:35
@victorlin victorlin self-assigned this Jul 5, 2023
@victorlin victorlin mentioned this pull request Jul 5, 2023
4 tasks
@codecov
Copy link

codecov bot commented Jul 5, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02 ⚠️

Comparison is base (9e8c9e0) 68.96% compared to head (857dbdb) 68.94%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1251      +/-   ##
==========================================
- Coverage   68.96%   68.94%   -0.02%     
==========================================
  Files          64       64              
  Lines        6946     6948       +2     
  Branches     1696     1695       -1     
==========================================
  Hits         4790     4790              
- Misses       1851     1853       +2     
  Partials      305      305              
Impacted Files Coverage Δ
augur/utils.py 71.95% <0.00%> (-0.59%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@tsibley tsibley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems fine. Thanks for addressing it!

@victorlin victorlin merged commit 72c7c85 into master Jul 5, 2023
26 checks passed
@victorlin victorlin deleted the victorlin/fix-os-sched_getaffinity branch July 5, 2023 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants