Return the number of delimiters with the given `priority`. If no `priority` is passed, defaults to max priority on the line.
(self, priority: Priority = 0)
| 148 | return max(v for k, v in self.delimiters.items() if k not in exclude) |
| 149 | |
| 150 | def delimiter_count_with_priority(self, priority: Priority = 0) -> int: |
| 151 | """Return the number of delimiters with the given `priority`. |
| 152 | |
| 153 | If no `priority` is passed, defaults to max priority on the line. |
| 154 | """ |
| 155 | if not self.delimiters: |
| 156 | return 0 |
| 157 | |
| 158 | priority = priority or self.max_delimiter_priority() |
| 159 | return sum(1 for p in self.delimiters.values() if p == priority) |
| 160 | |
| 161 | def maybe_increment_for_loop_variable(self, leaf: Leaf) -> bool: |
| 162 | """In a for loop, or comprehension, the variables are often unpacks. |
no test coverage detected