same as `feature_implies_c()` but stop collecting implied features when feature's option that provided through parameter 'keyisfalse' is False, also sorting the returned features.
(self, names, keyisfalse)
| 1482 | return final |
| 1483 | |
| 1484 | def feature_get_til(self, names, keyisfalse): |
| 1485 | """ |
| 1486 | same as `feature_implies_c()` but stop collecting implied |
| 1487 | features when feature's option that provided through |
| 1488 | parameter 'keyisfalse' is False, also sorting the returned |
| 1489 | features. |
| 1490 | """ |
| 1491 | def til(tnames): |
| 1492 | # sort from highest to lowest interest then cut if "key" is False |
| 1493 | tnames = self.feature_implies_c(tnames) |
| 1494 | tnames = self.feature_sorted(tnames, reverse=True) |
| 1495 | for i, n in enumerate(tnames): |
| 1496 | if not self.feature_supported[n].get(keyisfalse, True): |
| 1497 | tnames = tnames[:i+1] |
| 1498 | break |
| 1499 | return tnames |
| 1500 | |
| 1501 | if isinstance(names, str) or len(names) <= 1: |
| 1502 | names = til(names) |
| 1503 | # normalize the sort |
| 1504 | names.reverse() |
| 1505 | return names |
| 1506 | |
| 1507 | names = self.feature_ahead(names) |
| 1508 | names = {t for n in names for t in til(n)} |
| 1509 | return self.feature_sorted(names) |
| 1510 | |
| 1511 | def feature_detect(self, names): |
| 1512 | """ |
no test coverage detected