Этот коммит содержится в:
Vlad Pronsky 2023-12-27 01:07:04 +02:00
родитель f40c13a3db
Коммит 7b62efb38a
2 изменённых файлов: 6 добавлений и 3 удалений

Просмотреть файл

@ -1,7 +1,10 @@
[build-system] [build-system]
requires = ["hatchling"] requires = ["hatchling>=1.9.1"]
build-backend = "hatchling.build" build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["twscrape"]
[project] [project]
name = "twscrape" name = "twscrape"
version = "0.9.0" version = "0.9.0"
@ -70,4 +73,4 @@ line-length = 99
line-length = 99 line-length = 99
[tool.hatch.metadata] [tool.hatch.metadata]
allow-direct-references = true allow-direct-references = true

Просмотреть файл

@ -181,7 +181,7 @@ class QueueClient:
async def get(self, url: str, params: ReqParams = None): async def get(self, url: str, params: ReqParams = None):
return await self.req("GET", url, params=params) return await self.req("GET", url, params=params)
async def req(self, method: str, url: str, params: ReqParams = None): async def req(self, method: str, url: str, params: ReqParams = None) -> httpx.Response | None:
retry_count = 0 retry_count = 0
while True: while True:
ctx = await self._get_ctx() ctx = await self._get_ctx()