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 <>
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}"

Date User Action Args
2021-12-14 21:14:03TheRobotCarlsonsetrecipients: + TheRobotCarlson, sobolevn
2021-12-14 21:14:03TheRobotCarlsonsetmessageid: <>
2021-12-14 21:14:03TheRobotCarlsonlinkissue46073 messages
2021-12-14 21:14:03TheRobotCarlsoncreate