blob: f8b4122528cdff500b2feeda3e3f27e65ed19d56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# pylint: disable=missing-docstring,bare-except,pointless-statement,superfluous-parens
def strangeproblem():
try:
for _ in range(0, 4):
message = object()
print(type(message))
finally:
message = object()
try:
MY_INT = 1
print("MY_INT = %d" % MY_INT)
finally:
MY_INT = 2
try:
pass
except:
FALSE_POSITIVE = 1
FALSE_POSITIVE # here pylint claims used-before-assignment
finally:
FALSE_POSITIVE = 2 # this line is needed to reproduce the issue
|