Skip to content

Commit feafcb8

Browse files
authored
Check for call context in PartialFunction.infer_call_result (#2098)
1 parent 92fe829 commit feafcb8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

astroid/objects.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,9 @@ def infer_call_result(
314314
context: InferenceContext | None = None,
315315
) -> Iterator[InferenceResult]:
316316
if context:
317+
assert (
318+
context.callcontext
319+
), "CallContext should be set before inferring call result"
317320
current_passed_keywords = {
318321
keyword for (keyword, _) in context.callcontext.keywords
319322
}

0 commit comments

Comments
 (0)