In both cases the value must be either an integer, or inf - no other float is valid. While the PEP-586 Literal type wasn't handled by mypy when these annotations were first written, it certainly is now and would be semantically quite useful for IDE help.
https://github.com/python-trio/trio-typing/blob/d5835f7065f58ebdd95ca27b09d1d5cbe686b8b8/trio-stubs/__init__.pyi#L194-L199 https://github.com/python-trio/trio-typing/blob/d5835f7065f58ebdd95ca27b09d1d5cbe686b8b8/trio-stubs/__init__.pyi#L284-L288
In both cases the value must be either an integer, or
inf
- no other float is valid. While the PEP-586Literal
type wasn't handled by mypy when these annotations were first written, it certainly is now and would be semantically quite useful for IDE help.