Skip to content

Conversation

@TeamSpen210
Copy link
Contributor

Noticed this, start() was set to Any | None, but it never specifically returns None, only if you call started() with no parameter on a TaskStatus[None]. If you're using a different task status, forcing None checks is just wrong.

Copy link
Contributor

@A5rocks A5rocks left a comment

Choose a reason for hiding this comment

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

Yeah this makes sense. I don't really think it even matters whether it specifically returns None or not; it's just kind of irrelevant. (... if we want people to check, we should return object. If we don't, then Any. Any | something just doesn't really make sense)

@A5rocks A5rocks added the typing Adding static types to trio's interface label Mar 13, 2025
@codecov
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00000%. Comparing base (d63f3a9) to head (776843d).
Report is 186 commits behind head on main.

Additional details and impacted files
@@               Coverage Diff                @@
##                 main        #3224    +/-   ##
================================================
  Coverage   100.00000%   100.00000%            
================================================
  Files             124          124            
  Lines           18764        19244   +480     
  Branches         1269         1353    +84     
================================================
+ Hits            18764        19244   +480     
Files with missing lines Coverage Δ
src/trio/_core/_run.py 100.00000% <ø> (ø)

... and 6 files with indirect coverage changes

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

@A5rocks A5rocks added this pull request to the merge queue Mar 14, 2025
Merged via the queue into python-trio:main with commit b3ec5a1 Mar 14, 2025
43 checks passed
@TeamSpen210 TeamSpen210 deleted the start-non-none branch March 16, 2025 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

typing Adding static types to trio's interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants