Skip to content

Commit de510dc

Browse files
committed
refactor: Move to httpx from requests
1 parent 8c273fa commit de510dc

3 files changed

Lines changed: 7 additions & 53 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ dependencies = [
88
"dotenv>=0.9.9",
99
"fastapi[standard]>=0.117.1",
1010
"hikari>=2.4.1",
11+
"httpx>=0.28.1",
1112
"pre-commit>=4.3.0",
1213
"pytest>=8.4.2",
13-
"requests>=2.32.5",
1414
"ruff>=0.13.1",
1515
"setuptools>=80.9.0",
1616
]

src/utils/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import shelve
33

4-
import requests
4+
import httpx
55
import yaml
66
from hikari import ForumTag, GuildForumChannel
77
from hikari.impl import RESTClientImpl
@@ -48,7 +48,7 @@ async def fetch_item_name(item_node_id: str | None) -> str | None:
4848

4949
variables = {"id": item_node_id}
5050

51-
response = requests.post(
51+
response = httpx.post(
5252
"https://api.github.com/graphql",
5353
json={"query": query, "variables": variables},
5454
headers={"Authorization": f"Bearer {os.getenv('GITHUB_TOKEN')}"},
@@ -97,7 +97,7 @@ async def fetch_assignees(item_node_id: str | None) -> list[str]:
9797

9898
variables = {"id": item_node_id}
9999

100-
response = requests.post(
100+
response = httpx.post(
101101
"https://api.github.com/graphql",
102102
json={"query": query, "variables": variables},
103103
headers={"Authorization": f"Bearer {os.getenv('GITHUB_TOKEN')}"},
@@ -131,7 +131,7 @@ def fetch_single_select_value(item_node_id: str | None, field_name: str | None)
131131

132132
variables = {"id": item_node_id, "field_type": field_name}
133133

134-
response = requests.post(
134+
response = httpx.post(
135135
"https://api.github.com/graphql",
136136
json={"query": query, "variables": variables},
137137
headers={"Authorization": f"Bearer {os.getenv('GITHUB_TOKEN')}"},

uv.lock

Lines changed: 2 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)