Top-gg-Community / python-sdk

A simple API wrapper for top.gg written in Python

Home Page:https://docs.top.gg/docs/Libraries/python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unnecessary backoff and dubious sleep delay

norinorin opened this issue · comments

https://github.com/top-gg/python-sdk/blob/6752d477fa7e565cd179c69c24ba5c07fcb18664/topgg/http.py#L126-L148

Shouldn't it just continue at the last iteration instead of sleeping? It seems redundant to wait for n seconds just to raise the error; also, according to the docs, the retry-after header returns the millisecond timeout. Though, this lib treats it as seconds. Which one is correct?

Expected Behavior

It does the backoff only at the first iteration.

Current Behavior

It does the backoff at both iterations.

According to top-gg/docs#46, it's indeed in seconds.