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 BTaskaya
Recipients BTaskaya, eric.smith
Date 2020-03-27.00:18:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Note that dataclasses will break without annotations.

Yes, that is also affecting this simple tester script. There is no alternative to value-less annotated assignment.

I don't think this is preferable but just for information, these are the results for keeping AnnAssign nodes but just removing their annotation

    def visit_AnnAssign(self, node):
        self.stats += 1
        node.annotation = ast.copy_location(ast.Constant(value=None), node.annotation)
        return node

Total bytes: 1820086
Total bytes after 629 docstrings (total length of 180333) removed: 1643315
Total bytes after 8859 type annotations removed: 1664649

This way we can still support dataclasses but still gain as close as before
Date User Action Args
2020-03-27 00:18:55BTaskayasetrecipients: + BTaskaya, eric.smith
2020-03-27 00:18:55BTaskayasetmessageid: <>
2020-03-27 00:18:55BTaskayalinkissue40080 messages
2020-03-27 00:18:54BTaskayacreate