Complete cache key for inference tip#2158
Conversation
The cache key was lacking the `context` arg Co-authored-by: Sylvain Ackermann <sylvain.ackermann@gmail.com>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #2158 +/- ##
=======================================
Coverage 92.53% 92.53%
=======================================
Files 94 94
Lines 10800 10804 +4
=======================================
+ Hits 9994 9998 +4
Misses 806 806
Flags with carried forward coverage won't be shown. Click here to find out more.
|
DanielNoord
left a comment
There was a problem hiding this comment.
Test improvements look nice!
|
Unfortunately it has the same problem in pypy with Seems like the right approach, though, so we need to just deal with the RecursionError or something. |
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
Nice long-awaited improvements seeing the modification in the tests 😄
| i1 = next(ast_nodes[1].infer()) | ||
| assert isinstance(i1, nodes.Const) | ||
| assert i1.value == 2 # should be "Hello"! | ||
| assert i1.value == "Hello" |
|
Sorry for the noise, I'm experimenting to see if I can get the recursion error in pypy to resolve. |
for more information, see https://pre-commit.ci
|
RecursionError in PyPy fixed, see run on my fork failing on something else (compare to earlier run failing with RecursionError). |
Pierre-Sassoulas
left a comment
There was a problem hiding this comment.
You've been contributing some serious improvements in perf/caching -that astroid and pylint needs most- @jacobtylerwalls, amazing 👌
|
The readthedoc fail could be fixed by pinning urllib3 to < 2 it seems ? |
|
Others have solved it by ensuring Python 3.9 or higher is used for the build. Can we do that in a read the docs .yml? |
|
Suggestions!
|
Type of Changes
Description
As identified by @kriek in #1828, part of the cache key (context) was missing.
Alternative to #1832, which removes the cache, this just adds the missing part of the key.
Closes #1828
Closes pylint-dev/pylint#7464
Closes pylint-dev/pylint#8074
Refs #1982 (reverted)
Pylint test
The following diff in pylint will (almost) pass the test suite with this change.
PR shortly.PR once I can debug the remaining failures withdeprecated_typing_alias.