(count: int, noun: str)
| 1338 | |
| 1339 | |
| 1340 | def pluralize(count: int, noun: str) -> Tuple[int, str]: |
| 1341 | # No need to pluralize words such as `failed` or `passed`. |
| 1342 | if noun not in ["error", "warnings", "test"]: |
| 1343 | return count, noun |
| 1344 | |
| 1345 | # The `warnings` key is plural. To avoid API breakage, we keep it that way but |
| 1346 | # set it to singular here so we can determine plurality in the same way as we do |
| 1347 | # for `error`. |
| 1348 | noun = noun.replace("warnings", "warning") |
| 1349 | |
| 1350 | return count, noun + "s" if count != 1 else noun |
| 1351 | |
| 1352 | |
| 1353 | def _plugin_nameversions(plugininfo) -> List[str]: |
no outgoing calls
no test coverage detected