Closed tristanlatr closed 10 months ago
Here is a failing test case:
def test_annotation_def_is_not_assign_target(self):
code = 'from typing import Optional; var:Optional'
self.checkChains(code, ['Optional -> (Optional -> ())',
'var -> ()'])
Any opinion on this behavior @serge-sans-paille ?
The little it of code seems strange to https://github.com/serge-sans-paille/beniget/blob/master/beniget/beniget.py#L769-L772
I think the annotation should not be added to the uses of the target of the assignment. It's like saying "the assign target is where it's annotation is defined", which doesn't make any sens to me.
That way we could cleanup the extra(we need it for #72lambda
/None
values in the_defered_annotations
stack as well.Tell me what you think, @serge-sans-paille.