Skip to content

Only call future hook once, even if it returns None#239

Merged
jodal merged 1 commit intomainfrom
fix-future-hook-called-twice
Sep 7, 2025
Merged

Only call future hook once, even if it returns None#239
jodal merged 1 commit intomainfrom
fix-future-hook-called-twice

Conversation

@jodal
Copy link
Copy Markdown
Owner

@jodal jodal commented Sep 7, 2025

If a future's hook returned None, potentially after doing lots of expensive work, it would be called again and again every time the future was .get()-ed.

@codecov
Copy link
Copy Markdown

codecov bot commented Sep 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.47%. Comparing base (c9a2e5b) to head (af125f0).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
+ Coverage   93.45%   93.47%   +0.02%     
==========================================
  Files          14       14              
  Lines         565      567       +2     
  Branches       49       49              
==========================================
+ Hits          528      530       +2     
  Misses         32       32              
  Partials        5        5              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jodal jodal force-pushed the fix-future-hook-called-twice branch from 0849bd6 to af125f0 Compare September 7, 2025 07:33
@jodal jodal merged commit 8bd6470 into main Sep 7, 2025
13 checks passed
@jodal jodal deleted the fix-future-hook-called-twice branch September 7, 2025 07:33
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.

1 participant