mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
PY-21175 Add write instructions for assignments to attributes in CFG
to handle, in particular, lazy initialization scenarios For instance, the statement "foo.bar = 42" should add a node "WRITE ACCESS foo.bar" containing the corresponding target expression. Additionally, "Unused local" inspection doesn't consider writes to attributes, since, strictly speaking, these are not local names.
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
1(2) WRITE ACCESS: self
|
||||
2(3) WRITE ACCESS: args
|
||||
3(4) element: PyAssignmentStatement
|
||||
4(5) READ ACCESS: self
|
||||
5() element: null
|
||||
4(5) WRITE ACCESS: self.args
|
||||
5(6) READ ACCESS: self
|
||||
6() element: null
|
||||
@@ -1,7 +1,8 @@
|
||||
0(1) element: null
|
||||
1(2) WRITE ACCESS: self
|
||||
2(3) element: PyAssignmentStatement
|
||||
3(4) READ ACCESS: self
|
||||
4(5) element: PyPrintStatement
|
||||
5(6) READ ACCESS: self
|
||||
6() element: null
|
||||
3(4) WRITE ACCESS: self.foo
|
||||
4(5) READ ACCESS: self
|
||||
5(6) element: PyPrintStatement
|
||||
6(7) READ ACCESS: self
|
||||
7() element: null
|
||||
Reference in New Issue
Block a user