This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cooperlees
Recipients cooperlees, ncoghlan, serhiy.storchaka, yselivanov, zach.ware
Date 2022-02-22.18:19:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1645553987.4.0.991357920297.issue46819@roundup.psfhosted.org>
In-reply-to
Content
Ok thanks. Looks like the warning in flake8-bugbear is the right place then, unfortunately.

And just to be sure:

> Note that suppress without arguments corresponds to "except" and isinstance() with empty tuple.

Are you saying that `contextlib.suppress()` should effectively `except BaseException` (cause this is not the behavior from my tests) and suppress all or suppress nothing? I believe the empty tuple makes it except nothing?

```python
cooper@home1:~$ python3.11
Python 3.11.0a5+ (main, Feb 22 2022, 08:51:50) [GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import contextlib
>>> with contextlib.suppress():
...   raise ValueError("I raise ...")
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
ValueError: I raise ...
>>>
```
History
Date User Action Args
2022-02-22 18:19:47cooperleessetrecipients: + cooperlees, ncoghlan, zach.ware, serhiy.storchaka, yselivanov
2022-02-22 18:19:47cooperleessetmessageid: <1645553987.4.0.991357920297.issue46819@roundup.psfhosted.org>
2022-02-22 18:19:47cooperleeslinkissue46819 messages
2022-02-22 18:19:47cooperleescreate