Skip to content

Remove the NoReturn return type#232

Merged
wu-clan merged 1 commit intofastapi-practices:masterfrom
wu-clan:delete-NoReturn-typing
Oct 22, 2023
Merged

Remove the NoReturn return type#232
wu-clan merged 1 commit intofastapi-practices:masterfrom
wu-clan:delete-NoReturn-typing

Conversation

@wu-clan
Copy link
Member

@wu-clan wu-clan commented Oct 22, 2023

PLR.

@wu-clan wu-clan requested a review from downdawn October 22, 2023 00:29
@downdawn
Copy link
Collaborator

Why? Is there anything bad about it?

@wu-clan
Copy link
Member Author

wu-clan commented Oct 22, 2023

NoReturn should be used in infinite loop functions or system API functions, for regular returns, returning None is more friendly

@wu-clan
Copy link
Member Author

wu-clan commented Oct 22, 2023

Look here: python/typing#165

@wu-clan wu-clan merged commit d0b16b6 into fastapi-practices:master Oct 22, 2023
@wu-clan wu-clan deleted the delete-NoReturn-typing branch October 22, 2023 12:46
@downdawn
Copy link
Collaborator

OK

chuxijin pushed a commit to chuxijin/fba that referenced this pull request Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants