Skip to content

Commit bb0573d

Browse files
Suppress exception context describing a cache miss
Refs pylint-dev/pylint#8716
1 parent bd78ab0 commit bb0573d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

astroid/inference_tip.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ def inner(
6565
result = _cache[func, node, context] = list(
6666
func(node, context, **kwargs)
6767
)
68+
except Exception as e:
69+
# Suppress the KeyError from the cache miss.
70+
raise e from None
6871
finally:
6972
# Remove recursion guard.
7073
try:

0 commit comments

Comments
 (0)