Skip to content

Commit

Permalink
Check for call context in PartialFunction.infer_call_result (#2098)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdrozd authored May 19, 2023
1 parent 92fe829 commit feafcb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions astroid/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,9 @@ def infer_call_result(
context: InferenceContext | None = None,
) -> Iterator[InferenceResult]:
if context:
assert (
context.callcontext
), "CallContext should be set before inferring call result"
current_passed_keywords = {
keyword for (keyword, _) in context.callcontext.keywords
}
Expand Down

0 comments on commit feafcb8

Please sign in to comment.