Pop an item from the dict.
(self)
| 506 | raise exceptions.BadRequestKeyError(key) from None |
| 507 | |
| 508 | def popitem(self) -> tuple[K, V]: |
| 509 | """Pop an item from the dict.""" |
| 510 | item: tuple[K, list[V]] |
| 511 | |
| 512 | try: |
| 513 | item = super().popitem() # type: ignore[assignment] |
| 514 | |
| 515 | if len(item[1]) == 0: |
| 516 | raise exceptions.BadRequestKeyError(item[0]) |
| 517 | |
| 518 | return item[0], item[1][0] |
| 519 | except KeyError as e: |
| 520 | raise exceptions.BadRequestKeyError(e.args[0]) from None |
| 521 | |
| 522 | def poplist(self, key: K) -> list[V]: |
| 523 | """Pop the list for a key from the dict. If the key is not in the dict |
no outgoing calls
no test coverage detected