Skip to content

Commit cf9ef9c

Browse files
codebydivineclaude
andcommitted
fix: Remove type ignore comments and update to divine-requests 0.1.11
Updated to divine-requests 0.1.11 which includes proper type overloads for NetworkingManager methods. This allows mypy to correctly infer response.data types when expected_type is provided, eliminating the need for type ignores. Now response.data is properly typed as the expected validated type instead of Any. Bump version to 0.1.15. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 33cd80a commit cf9ef9c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "divine-thegraph-token-api"
7-
version = "0.1.14"
7+
version = "0.1.15"
88
authors = [
99
{ name="DIVINE", email="[email protected]" },
1010
]
@@ -26,7 +26,7 @@ classifiers = [
2626
]
2727
keywords = ["blockchain", "ethereum", "solana", "defi", "nft", "api", "thegraph", "web3", "crypto"]
2828
dependencies = [
29-
"divine-requests==0.1.10",
29+
"divine-requests==0.1.11",
3030
"divine-type-enforcer==0.1.8",
3131
"anyio>=4.0.0",
3232
]

src/thegraph_token_api/base.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88

99
# Import divine-requests (should be installed as a package)
10-
from requests import NetworkingManager # type: ignore[import-untyped]
10+
from requests import NetworkingManager
1111

1212
from .types import NetworksResponse, VersionResponse
1313

@@ -68,7 +68,7 @@ async def get_health(self) -> str:
6868
Health status string (should be "OK")
6969
"""
7070
response = await self.manager.get(f"{self.base_url}/health", headers=self._headers)
71-
return response.text # type: ignore[no-any-return]
71+
return response.text
7272

7373
async def get_version(self) -> VersionResponse:
7474
"""
@@ -80,7 +80,7 @@ async def get_version(self) -> VersionResponse:
8080
response = await self.manager.get(
8181
f"{self.base_url}/version", headers=self._headers, expected_type=VersionResponse
8282
)
83-
return response.data # type: ignore[no-any-return]
83+
return response.data
8484

8585
async def get_networks(self) -> NetworksResponse:
8686
"""
@@ -92,4 +92,4 @@ async def get_networks(self) -> NetworksResponse:
9292
response = await self.manager.get(
9393
f"{self.base_url}/networks", headers=self._headers, expected_type=NetworksResponse
9494
)
95-
return response.data # type: ignore[no-any-return]
95+
return response.data

0 commit comments

Comments
 (0)