Message365122
> 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:55 | BTaskaya | set | recipients:
+ BTaskaya, eric.smith |
2020-03-27 00:18:55 | BTaskaya | set | messageid: <1585268335.61.0.11686342913.issue40080@roundup.psfhosted.org> |
2020-03-27 00:18:55 | BTaskaya | link | issue40080 messages |
2020-03-27 00:18:54 | BTaskaya | create | |
|