-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Honor
NoReturn
as __setitem__
return type to mark unreachable cod…
…e. (#12572) In general code that follows any calls to methods annotated with `NoReturn` is considered unreachable. However calls like `variable['foo'] = 'foo'` are not treated this way. Moreover, `variable.__setitem__('foo', 'foo')` is interpreted properly, so this behavior is inconsistent. After this change both variants result in marking remaining part of the branch as unreachable.
- Loading branch information
1 parent
800e8ff
commit 30d0c99
Showing
2 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters