(leaf: Leaf, features: Collection[Feature])
| 1340 | |
| 1341 | |
| 1342 | def _can_add_trailing_comma(leaf: Leaf, features: Collection[Feature]) -> bool: |
| 1343 | if is_vararg(leaf, within={syms.typedargslist}): |
| 1344 | return Feature.TRAILING_COMMA_IN_DEF in features |
| 1345 | if is_vararg(leaf, within={syms.arglist, syms.argument}): |
| 1346 | return Feature.TRAILING_COMMA_IN_CALL in features |
| 1347 | return True |
| 1348 | |
| 1349 | |
| 1350 | def _safe_add_trailing_comma(safe: bool, delimiter_priority: int, line: Line) -> Line: |
no test coverage detected