Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions fastbencode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
4 changes: 2 additions & 2 deletions fastbencode/_bencode_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ include-package-data = false
version = {attr = "fastbencode.__version__"}

[tool.ruff]
target-version = "py37"
line-length = 79

[tool.ruff.lint]
Expand Down
Loading