Skip to content

Commit b6d097c

Browse files
committed
Replace requests with httpx
1 parent 065e77c commit b6d097c

File tree

3 files changed

+61
-114
lines changed

3 files changed

+61
-114
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ classifiers = [
2121
"Programming Language :: Python :: Implementation :: CPython",
2222
]
2323
dependencies = [
24-
"requests",
24+
"httpx",
2525
]
2626

2727
[dependency-groups]
@@ -34,7 +34,6 @@ lint = [
3434
"flake8-builtins",
3535
"flake8-pep585",
3636
"mypy",
37-
"types-requests",
3837
]
3938
tool = [
4039
"pre-commit",

src/module_name/sample.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
import requests
5+
import httpx
66

77

88
def main() -> bool:
@@ -18,4 +18,4 @@ def squared(value: int) -> int:
1818

1919
def health_check() -> bool:
2020
"""Returns true when github.com is accessible."""
21-
return requests.get("https://github.com").ok
21+
return httpx.get("https://github.com").is_success

0 commit comments

Comments
 (0)