diff --git a/fastbencode/__init__.py b/fastbencode/__init__.py index 84d5d78..d05c953 100644 --- a/fastbencode/__init__.py +++ b/fastbencode/__init__.py @@ -16,12 +16,10 @@ """Wrapper around the bencode Rust and Python implementations.""" -from typing import Type - __version__ = (0, 3, 10) -Bencached: Type +Bencached: type try: from fastbencode._bencode_rs import ( diff --git a/fastbencode/_bencode_py.py b/fastbencode/_bencode_py.py index bcb44fe..ba5fe4c 100644 --- a/fastbencode/_bencode_py.py +++ b/fastbencode/_bencode_py.py @@ -17,7 +17,7 @@ # Modifications copyright (C) 2021-2023 Jelmer Vernooij -from typing import Callable, Dict, List, Type +from collections.abc import Callable class BDecoder: @@ -118,7 +118,7 @@ def __init__(self, s) -> None: class BEncoder: def __init__(self, bytestring_encoding=None): self.bytestring_encoding = bytestring_encoding - self.encode_func: Dict[Type, Callable[[object, List[bytes]], None]] = { + self.encode_func: dict[type, Callable[[object, list[bytes]], None]] = { Bencached: self.encode_bencached, int: self.encode_int, bytes: self.encode_bytes, diff --git a/pyproject.toml b/pyproject.toml index 2bff901..20e5c3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,6 @@ include-package-data = false version = {attr = "fastbencode.__version__"} [tool.ruff] -target-version = "py37" line-length = 79 [tool.ruff.lint]