From 7b62efb38ada6e0db54c0186833c4e2064beddc6 Mon Sep 17 00:00:00 2001 From: Vlad Pronsky Date: Wed, 27 Dec 2023 01:07:04 +0200 Subject: [PATCH] build fix --- pyproject.toml | 7 +++++-- twscrape/queue_client.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 577719b..00130cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,10 @@ [build-system] -requires = ["hatchling"] +requires = ["hatchling>=1.9.1"] build-backend = "hatchling.build" +[tool.hatch.build.targets.wheel] +packages = ["twscrape"] + [project] name = "twscrape" version = "0.9.0" @@ -70,4 +73,4 @@ line-length = 99 line-length = 99 [tool.hatch.metadata] -allow-direct-references = true \ No newline at end of file +allow-direct-references = true diff --git a/twscrape/queue_client.py b/twscrape/queue_client.py index 1391e1c..1210798 100644 --- a/twscrape/queue_client.py +++ b/twscrape/queue_client.py @@ -181,7 +181,7 @@ async def _check_rep(self, rep: httpx.Response) -> None: async def get(self, url: str, params: ReqParams = None): 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 while True: ctx = await self._get_ctx()