-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working
Description
Discussed in #2920
Originally posted by JelleZijlstra January 22, 2022
I was exploring pyright's treatment of NoReturn (in preparation for adding and documenting typing.Never) and noticed that pyright allows passing NoReturn to parameters of type object. For example, this typechecks:
def f(x: NoReturn):
repr(x) # repr() takes object
Is this an intentional behavior? It's not what I expected on first principles but it seems useful in practice.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
addressed in next versionIssue is fixed and will appear in next published versionIssue is fixed and will appear in next published versionbugSomething isn't workingSomething isn't working