Skip to content

Commit

Permalink
Manadatory fields for Await
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdrozd authored and DanielNoord committed Apr 4, 2023
1 parent 81c6c8f commit 11c7a26
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 37 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Release date: TBA
- ``nodes.AssignName``
- ``nodes.Attribute``
- ``nodes.AugAssign``
- ``nodes.Await``
- ``nodes.BinOp``
- ``nodes.Compare``
- ``nodes.Delete``
Expand Down
40 changes: 3 additions & 37 deletions astroid/nodes/node_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -2534,44 +2534,10 @@ async def func(things):

_astroid_fields = ("value",)

def __init__(
self,
lineno: int | None = None,
col_offset: int | None = None,
parent: NodeNG | None = None,
*,
end_lineno: int | None = None,
end_col_offset: int | None = None,
) -> None:
"""
:param lineno: The line that this node appears on in the source code.
:param col_offset: The column that this node appears on in the
source code.
:param parent: The parent node in the syntax tree.
:param end_lineno: The last line this node appears on in the source code.
:param end_col_offset: The end column this node appears on in the
source code. Note: This is after the last symbol.
"""
self.value: NodeNG | None = None
"""What to wait for."""

super().__init__(
lineno=lineno,
col_offset=col_offset,
end_lineno=end_lineno,
end_col_offset=end_col_offset,
parent=parent,
)

def postinit(self, value: NodeNG | None = None) -> None:
"""Do some setup after initialisation.
value: NodeNG
"""What to wait for."""

:param value: What to wait for.
"""
def postinit(self, value: NodeNG) -> None:
self.value = value

def get_children(self):
Expand Down

0 comments on commit 11c7a26

Please sign in to comment.