This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author TheRobotCarlson
Recipients TheRobotCarlson, sobolevn
Date 2021-12-14.21:14:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1639516443.04.0.219671332453.issue46073@roundup.psfhosted.org>
In-reply-to
Content
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!
History
Date User Action Args
2021-12-14 21:14:03TheRobotCarlsonsetrecipients: + TheRobotCarlson, sobolevn
2021-12-14 21:14:03TheRobotCarlsonsetmessageid: <1639516443.04.0.219671332453.issue46073@roundup.psfhosted.org>
2021-12-14 21:14:03TheRobotCarlsonlinkissue46073 messages
2021-12-14 21:14:03TheRobotCarlsoncreate