From 2bd8cc177ac040f07acabbbd437d4ac1965cb525 Mon Sep 17 00:00:00 2001 From: bohd4nx Date: Sun, 5 Jul 2026 16:16:14 +0300 Subject: [PATCH] chore: update version to 2026.3.3 and dependencies; improve string formatting in transport functions --- README.md | 6 +++--- pyfragment/core/transport.py | 4 ++-- pyproject.toml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 35de889..c0fd664 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,13 @@ async def main() -> None: cookies={"stel_ssid": "...", "stel_dt": "...", "stel_token": "...", "stel_ton_token": "..."}, ) as client: wallet = await client.get_wallet() - print(f"GRAM: {wallet.gram_balance} | USDT: {wallet.usdt_balance}") + print("GRAM: %s | USDT: %s" % (wallet.gram_balance, wallet.usdt_balance)) stars = await client.purchase_stars("@username", amount=500, payment_method=PaymentMethod.USDT_GRAM) - print(f"Sent {stars.amount} Stars to {stars.username} | tx: {stars.transaction_id}") + print("Sent %s Stars to %s | tx: %s" % (stars.amount, stars.username, stars.transaction_id)) premium = await client.purchase_premium("@username", months=6, payment_method=PaymentMethod.GRAM) - print(f"Sent Premium {premium.amount}m to {premium.username} | tx: {premium.transaction_id}") + print("Sent Premium %sm to %s | tx: %s" % (premium.amount, premium.username, premium.transaction_id)) asyncio.run(main()) diff --git a/pyfragment/core/transport.py b/pyfragment/core/transport.py index 3e4258d..4a6fe83 100644 --- a/pyfragment/core/transport.py +++ b/pyfragment/core/transport.py @@ -12,7 +12,7 @@ from pyfragment.exceptions import FragmentPageError, ParseError async def get_fragment_hash( - session: AsyncSession[Any], # type: ignore[type-arg] + session: AsyncSession[Any], headers: dict[str, str], page_url: str, ) -> str: @@ -43,7 +43,7 @@ def parse_json_response(response: Response, context: str) -> dict[str, Any]: async def fragment_request( - session: AsyncSession[Any], # type: ignore[type-arg] + session: AsyncSession[Any], fragment_hash: str, headers: dict[str, str], data: dict[str, Any], diff --git a/pyproject.toml b/pyproject.toml index 334088a..0addc3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "pyfragment" -version = "2026.3.2" +version = "2026.3.3" description = "Async Python client for the Fragment.com marketplace API." readme = "README.md" license = { text = "MIT" } @@ -34,7 +34,7 @@ classifiers = [ "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] -dependencies = ["curl-cffi>=0.7", "tonutils>=2.0.1"] +dependencies = ["curl-cffi>=0.14.0", "tonutils>=2.0.1"] [project.optional-dependencies] dev = ["pytest", "pytest-asyncio", "pytest-mock", "mypy", "ruff"]