aloof-angle-91616
08/17/2019, 7:16 PMdatatype
, specifically things like factory methods to coerce individual arguments: https://docs.python.org/3/library/dataclasses.html#dataclasses.field.hundreds-father-404
08/17/2019, 7:17 PMaloof-angle-91616
08/17/2019, 7:17 PMaloof-angle-91616
08/17/2019, 7:17 PMhundreds-father-404
08/17/2019, 7:19 PMUnion[str, List[str]]
. The typing
library is really nicealoof-angle-91616
08/17/2019, 7:19 PMaloof-angle-91616
08/17/2019, 8:34 PMaloof-angle-91616
08/17/2019, 10:33 PMaloof-angle-91616
08/17/2019, 10:37 PMhundreds-father-404
08/17/2019, 10:53 PMaloof-angle-91616
08/17/2019, 11:02 PMaloof-angle-91616
08/18/2019, 6:35 PMdatatype()
as well, actuallyhundreds-father-404
08/18/2019, 6:39 PMaloof-angle-91616
08/18/2019, 7:06 PMaloof-angle-91616
08/18/2019, 7:06 PMaloof-angle-91616
08/18/2019, 7:12 PM@dataclasstype
in this PR because it means that we can expect python code for pants rules to work regardless of any breaking changes in @dataclass
in future python versions, for example -- rule writers can make sure to instead just write against the stable (or at least, pants-controlled) DatatypeMixin
API. this allows us to swap out the backend again later (e.g. for something that generates rust struct/enum definitions for all datatypes!!!)!!!aloof-angle-91616
08/18/2019, 7:13 PMaloof-angle-91616
08/18/2019, 10:14 PM