Debian Codegraph @

Lib/test/test_importlib/metadata/_context.py

raw
1 import contextlib
2
3
4 # from jaraco.context 4.3
5 class suppress(contextlib.suppress, contextlib.ContextDecorator):
6 """
7 A version of contextlib.suppress with decorator support.
8
9 >>> @suppress(KeyError)
10 ... def key_error():
11 ... {}['']
12 >>> key_error()
13 """