junrushao1994 commented on code in PR #12111:
URL: https://github.com/apache/tvm/pull/12111#discussion_r931328506
##########
python/tvm/script/printer/doc.py:
##########
@@ -100,6 +100,31 @@ def __iter__(self):
raise RuntimeError(f"{self.__class__} cannot be used as iterable.")
+class StmtDoc(Doc):
+ """Base class of statement doc"""
+
+ @property
+ def comment(self) -> Optional[str]:
+ # It has to call the dunder method to avoid infinite recursion
+ # pylint: disable=unnecessary-dunder-call
+ return self.__getattr__("comment")
+ # pylint: enable=unnecessary-dunder-call
Review Comment:
nit if you only want to disable specific lint on a single line
```suggestion
return self.__getattr__("comment") # pylint:
disable=unnecessary-dunder-call
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]