mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:25:17 +00:00
![]() Fix #14558 ## Summary - Add `typing.NoReturn` and `typing.Never` to known instances and infer them as `Type::Never` - Add `is_assignable_to` cases for `Type::Never` I skipped emitting diagnostic for when a function is annotated as `NoReturn` but it actually returns. ## Test Plan Added tests from https://github.com/python/typing/blob/main/conformance/tests/specialtypes_never.py except from generics and checking if the return value of the function and the annotations match. --------- Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com> Co-authored-by: Carl Meyer <carl@astral.sh> |
||
---|---|---|
.. | ||
attribute.md | ||
boolean.md | ||
if.md |