(
store: object | None,
mode: RoutingMode,
tier: Tier,
)
| 693 | |
| 694 | |
| 695 | def _bucket_pulls( |
| 696 | store: object | None, |
| 697 | mode: RoutingMode, |
| 698 | tier: Tier, |
| 699 | ) -> int: |
| 700 | if store is None or not hasattr(store, "bucket_pulls"): |
| 701 | return 0 |
| 702 | try: |
| 703 | pulls = int(store.bucket_pulls(mode, tier)) |
| 704 | except Exception: |
| 705 | try: |
| 706 | pulls = int(store.bucket_pulls(mode)) |
| 707 | except Exception: |
| 708 | return 0 |
| 709 | return max(0, pulls) |
| 710 | |
| 711 | |
| 712 | def _bandit_bonus( |
no test coverage detected