Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
chore: drop python 3.8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
monosans committed Oct 17, 2024
1 parent 267f619 commit f0e2fe4
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 253 deletions.
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[mypy]
python_version = 3.8
python_version = 3.9
disallow_subclassing_any = False
disallow_untyped_decorators = False
warn_unreachable = True
Expand Down
3 changes: 2 additions & 1 deletion nitro_generator_checker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
import tomli as tomllib

if TYPE_CHECKING:
from typing import Callable, Coroutine
from collections.abc import Coroutine
from typing import Callable

from typing_extensions import Any, TypeVar

Expand Down
19 changes: 11 additions & 8 deletions nitro_generator_checker/nitro_checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from .utils import create_background_task

if TYPE_CHECKING:
from typing import Mapping
from collections.abc import Mapping

from rich.console import Console
from typing_extensions import Any, Self
Expand Down Expand Up @@ -98,13 +98,16 @@ async def checker(self, *, live: Live) -> None:
proxy = self._proxy_generator.get_random_proxy()
try:
connector = ProxyConnector.from_url(proxy, ssl=SSL_CONTEXT)
async with ClientSession(
connector=connector,
headers=HEADERS,
cookie_jar=self._session.cookie_jar,
timeout=self._timeout,
fallback_charset_resolver=fallback_charset_resolver,
) as session, session.get(url) as response:
async with (
ClientSession(
connector=connector,
headers=HEADERS,
cookie_jar=self._session.cookie_jar,
timeout=self._timeout,
fallback_charset_resolver=fallback_charset_resolver,
) as session,
session.get(url) as response,
):
pass
except asyncio.TimeoutError:
logger.info("%s proxy timed out", proxy)
Expand Down
2 changes: 1 addition & 1 deletion nitro_generator_checker/nitro_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import random
import string
import sys
from typing import Iterator
from collections.abc import Iterator

if sys.version_info >= (3, 12):
from typing import override
Expand Down
3 changes: 2 additions & 1 deletion nitro_generator_checker/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
import charset_normalizer

if TYPE_CHECKING:
from typing import Callable, Coroutine
from collections.abc import Coroutine
from typing import Callable

from typing_extensions import Any, ParamSpec, TypeVar

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "nitro-generator-checker"
version = "0.0.0"
license = { text = "MIT" }
authors = [{ name = "monosans", email = "[email protected]" }]
requires-python = ">=3.8,<4"
requires-python = ">=3.9,<4"
classifiers = ["Private :: Do Not Upload"]
dependencies = [
"aiofiles",
Expand Down
2 changes: 1 addition & 1 deletion ruff.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
line-length = 80
preview = true
target-version = "py38"
target-version = "py39"

[format]
docstring-code-format = true
Expand Down
323 changes: 84 additions & 239 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit f0e2fe4

Please sign in to comment.