Open jxnu-liguobin opened 4 years ago
Thanks for your report. I agree that it is a false positive.
I boiled down your example to this, just to confirm the behavior of nonlocal :stuck_out_tongue:
class MyClass:
def test(self, arg_foo) -> bool:
temp = -(2 ** 32)
def inner(arg):
nonlocal temp
print(arg, temp)
inner(arg_foo)
o = MyClass()
o.test(42)
We're currently busy reworking large parts of the Python QL libraries, so we won't be focusing on fixing this until later this year.
Ok, thank you
Description of the false positive
I think this is wrong
https://lgtm.com/projects/g/jxnu-liguobin/cs-summary-reflection/alerts/?mode=list
https://lgtm.com/projects/g/jxnu-liguobin/cs-summary-reflection/snapshot/b7b15d5bb273a65f0aa7057dcc6f8e057d48279f/files/python-leetcode/solution/tree/leetcode_98_.py#x7d357e194b0defcd:1