blob: fe5c3f25a27ba6bd9c1d342d015118e38d823258 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
"""
Regression test for `no-member`.
See: https://github.com/PyCQA/pylint/issues/2567
"""
# pylint: disable=missing-docstring,too-few-public-methods
import contextlib
@contextlib.contextmanager
def context_manager():
try:
yield
finally:
pass
cm = context_manager()
cm.__enter__()
cm.__exit__(None, None, None)
@contextlib.contextmanager
def other_context_manager():
try:
yield
finally:
pass
with other_context_manager(): # notice the function call
pass
|