summaryrefslogtreecommitdiff
path: root/tests/testdata/python3
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2020-03-06 10:46:26 +0100
committerClaudiu Popa <pcmanticore@gmail.com>2020-03-06 10:54:48 +0100
commit17a5ee681bcf4aacffcc4ec5afbc3436cfdc4537 (patch)
tree10c691821e62b58c4c4a9efd5b29ef828306c24c /tests/testdata/python3
parent88fd426e14c34cb5771fd6c06f5a1ba50bb03292 (diff)
downloadastroid-git-17a5ee681bcf4aacffcc4ec5afbc3436cfdc4537.tar.gz
Cache the inference of FunctionDef to prevent property inference mutating locals
When inferring a property, we instantiate a new `objects.Property` object, which in turn, because it inherits from `FunctionDef`, sets itself in the locals of the wrapping frame. This means that everytime we infer a property, the locals are mutated with a new instance of the property. Using `context` with `path_wrapper` would not have helped, because we call `inferred()` on functions in multiple places in pylint's codebase.
Diffstat (limited to 'tests/testdata/python3')
0 files changed, 0 insertions, 0 deletions