Rename STATUS_IGNORED to TASK_STATUS_IGNORED #353
Merged
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.
The asymmetry in task_status=trio.STATUS_IGNORED is bugging me too much. I
gotta change it.
What to change it to? task_status=trio.TASK_STATUS_IGNORED is kind of
long -- 36 characters -- and likely to make 80-character lines wrap.
But the old one was 31 characters, which is already likely to make
80-character lines wrap, and I haven't had any better ideas.
I don't want to make it status=STATUS_IGNORED, because then we're
claiming the kwarg "status" in every Trio server function, which seems
just a little too generic. task_status is more unique and I think
better for attaching this special convention to.
I thought about task_status=NO_TASK_STATUS, but that feels weird. It's
not that the task has no status, it's that the caller is ignoring that
status. I guess we could switch to something like
status_reporter=trio.NO_STATUS_REPORTER but that's even longer (39
characters), and not really any clearer.