Annotate and refactor limits.py
Relates to #1511
Adds annotations to utils/limits.py, but notably also removes and refactors some code.
Would understand if the refactoring isn't wanted, but AFAICT the file is not a part of the public API, and the code is completely unused. Annotating this code is also made a little harder by this fact.
Specifically this removes the add, pop, and clear_pending methods on the TokenBucket class. This seems to be the commit where they were added - but they're not implemented here either: https://github.com/celery/kombu/commit/946c59c55953375ab72cd821335e21adc3293109. No tests were broken by the removal and I can only see one place where the class is accessed. None of the downstream uses from that one property call any of these methods.
Done @auvipy 👍
@Kludex can you have a look