Skip to content

Commit

Permalink
Force comments to also have a _uid
Browse files Browse the repository at this point in the history
I see no reason why Comments node wouldnt call the __post_init__ in
their __post_init__ like all other nodes do.
  • Loading branch information
joscao committed Sep 13, 2023
1 parent e05b0d3 commit cd1a40e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions loki/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,7 @@ class Comment(LeafNode, _CommentBase):
"""

def __post_init__(self):
super().__post_init__()
assert isinstance(self.text, str)

def __repr__(self):
Expand Down

0 comments on commit cd1a40e

Please sign in to comment.