Message408565
The second solution seems more optimal, in my opinion. I monkey patched the function like this in my own code:
```
def get_type_comment(self, node):
comment = self._type_ignores.get(node.lineno) if hasattr(node, "lineno") else node.type_comment
if comment is not None:
return f" # type: {comment}"
```
Thanks! |
|
Date |
User |
Action |
Args |
2021-12-14 21:14:03 | TheRobotCarlson | set | recipients:
+ TheRobotCarlson, sobolevn |
2021-12-14 21:14:03 | TheRobotCarlson | set | messageid: <1639516443.04.0.219671332453.issue46073@roundup.psfhosted.org> |
2021-12-14 21:14:03 | TheRobotCarlson | link | issue46073 messages |
2021-12-14 21:14:03 | TheRobotCarlson | create | |
|