diff options
author | Daniel van Noord <13665637+DanielNoord@users.noreply.github.com> | 2023-04-25 13:32:28 +0200 |
---|---|---|
committer | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2023-04-25 13:52:45 +0200 |
commit | f13b247d617de36f44d7e825566f134174723c28 (patch) | |
tree | 2bed6354c5e96263f2cdbca0adda8d7dad6c47d4 /ChangeLog | |
parent | 82f62c26038b12466e075a235427f73d073f8362 (diff) | |
download | astroid-git-f13b247d617de36f44d7e825566f134174723c28.tar.gz |
Fix the signature of ``infer_call_result``
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -24,6 +24,19 @@ Release date: TBA We have tried to minimize the amount of breaking changes caused by this change but some are unavoidable. +* ``infer_call_result`` now shares the same interface across all implemenations. Namely: + ```python + def infer_call_result( + self, + caller: SuccessfulInferenceResult | None, + context: InferenceContext | None = None, + ) -> Iterator[InferenceResult]: + ``` + + This is a breaking change for ``nodes.FunctionDef`` where previously ``caller`` had a default of + ``None``. Passing ``None`` again will not create a behaviour change. + The breaking change allows us to better type and re-use the method within ``astroid``. + * Improved signature of the ``__init__`` and ``__postinit__`` methods of most nodes. This includes makes ``lineno``, ``col_offset``, ``end_lineno``, ``end_col_offset`` and ``parent`` required arguments for ``nodes.NodeNG`` and its subclasses. |