diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2023-04-25 08:34:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 08:34:23 +0200 |
commit | fc684733795186ab964095bc40646fc37f586cfd (patch) | |
tree | 549c9382dbbcbda9412bc4b328075a42afb8b274 /ChangeLog | |
parent | 617b6a7f6fb80395ae527dd6304b4cb45623604c (diff) | |
download | astroid-git-fc684733795186ab964095bc40646fc37f586cfd.tar.gz |
Make all arguments to ``nodes.NodeNG.__init__`` required (#2138)
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -24,7 +24,12 @@ Release date: TBA We have tried to minimize the amount of breaking changes caused by this change but some are unavoidable. -* Improved signature of the ``__init__`` and ``__postinit__`` methods of the following nodes: +* 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. + For most other nodes, arguments of their ``__postinit__`` methods have been made required to better + represent how they would normally be constructed by the standard library ``ast`` module. + The following nodes were changed or updated: - ``nodes.AnnAssign`` - ``nodes.Arguments`` - ``nodes.Assign`` @@ -55,12 +60,13 @@ Release date: TBA - ``nodes.ListComp`` - ``nodes.Module`` - ``nodes.Name`` + - ``nodes.NodeNG`` - ``nodes.Raise`` - ``nodes.Return`` - ``nodes.SetComp`` - ``nodes.Slice`` - ``nodes.Starred`` - - ``nodes.Super``, we also added the ``call`` parameter to its ``__init__`` method. + - ``objects.Super``, we also added the ``call`` parameter to its ``__init__`` method. - ``nodes.TryExcept`` - ``nodes.Subscript`` - ``nodes.UnaryOp`` |