PY-59727 Infer types from usages only for collections assigned to variables
For everything else, e.g. d['key'] = {'foo': 42}, we cannot track subsequent modifications of d['key'], such as d['key']['bar'] = 1, anyway. We need a reference as a subscription operand, or a callee to make sure these mutating operations are performed on the same value. It doesn't make sense to scan through an entire containing scope looking for subscription expressions and calls on such assignments targets. (cherry picked from commit 8ebbcb73e43e5711cbe680da6936f3f1c4e54a55) IJ-MR-105530 GitOrigin-RevId: 65ebcc9219fb05c4131a8598ab54a9e37c6489e7
Showing
+11 -26
Please register or sign in to comment