hundreds-breakfast-49010
10/01/2019, 1:02 AM@rule that has a signature Tuple[X], and then use that?aloof-angle-91616
10/01/2019, 1:03 AMCollection.ofhundreds-father-404
10/01/2019, 1:03 AMTuple[X] != Tuple[X, ...]hundreds-breakfast-49010
10/01/2019, 1:03 AMhundreds-father-404
10/01/2019, 1:03 AMTuple[X] == tuple of 1 element of type X
Tuple[X, ...] == tuple of n elements of type Xhundreds-breakfast-49010
10/01/2019, 1:03 AM@rule\ndef my_rule(x: Collection.of(WhateverType)) -> OutputType:...hundreds-breakfast-49010
10/01/2019, 1:04 AMx = yield Get(OutputType, WhateverType, (a, b, c,))?aloof-angle-91616
10/01/2019, 1:04 AMsrc/python/pants/engine/build_files.py for how it's usedaloof-angle-91616
10/01/2019, 1:04 AMCollectionOfWhatever = Collection.of(WhateverType)hundreds-breakfast-49010
10/01/2019, 1:04 AMwitty-crayon-22786
10/01/2019, 4:00 PMwitty-crayon-22786
10/01/2019, 4:01 PMwitty-crayon-22786
10/01/2019, 4:01 PMaloof-angle-91616
10/01/2019, 4:01 PMaloof-angle-91616
10/01/2019, 4:02 PMTuple[...] as @hundreds-father-404 was saying is the type ascriptionwitty-crayon-22786
10/01/2019, 4:02 PMwitty-crayon-22786
10/01/2019, 4:02 PMaloof-angle-91616
10/01/2019, 4:02 PMTuple[X, X, X, X, X, ...]aloof-angle-91616
10/01/2019, 4:02 PMwitty-crayon-22786
10/01/2019, 4:03 PMaloof-angle-91616
10/01/2019, 4:03 PMaloof-angle-91616
10/01/2019, 4:03 PMwitty-crayon-22786
10/01/2019, 4:05 PMCollection.ofwitty-crayon-22786
10/01/2019, 4:06 PMTuple[*X] syntax? varargs?aloof-angle-91616
10/01/2019, 4:06 PMhundreds-breakfast-49010
10/01/2019, 5:17 PMhundreds-breakfast-49010
10/01/2019, 5:17 PMaloof-angle-91616
10/01/2019, 6:33 PMaloof-angle-91616
10/01/2019, 6:33 PMaloof-angle-91616
10/01/2019, 6:33 PMwitty-crayon-22786
10/01/2019, 6:34 PMhundreds-breakfast-49010
10/01/2019, 6:36 PMPythonTargetAdaptorhundreds-breakfast-49010
10/01/2019, 6:36 PMwitty-crayon-22786
10/01/2019, 6:40 PMwitty-crayon-22786
10/01/2019, 6:40 PMhundreds-breakfast-49010
10/01/2019, 6:43 PM@rulehundreds-breakfast-49010
10/01/2019, 6:44 PMwitty-crayon-22786
10/01/2019, 6:47 PMwitty-crayon-22786
10/01/2019, 6:47 PM@rule when compared to using a private function.witty-crayon-22786
10/01/2019, 6:48 PMwitty-crayon-22786
10/01/2019, 9:42 PMaloof-angle-91616
10/01/2019, 9:43 PM